修复配置界面中下拉选择检索条件,js使用el表达式赋值时存在html特殊字符未转换问题;
导入字符串字段增加escapeHtml4转换; 域名校验不使用完整的域名格式校验。
This commit is contained in:
@@ -20,6 +20,7 @@ import java.util.concurrent.BlockingQueue;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
|
||||
@@ -468,7 +469,7 @@ public class ImportBigExcel extends XLSXCovertCSVReader{
|
||||
if(StringUtils.endsWith(s, ".0") && !s.endsWith("0.0.0.0")){
|
||||
val = StringUtils.substringBefore(s, ".0");
|
||||
}else{
|
||||
val = String.valueOf(val.toString().trim());
|
||||
val=val == null ? "" : StringEscapeUtils.escapeHtml4(val.toString().trim());
|
||||
}
|
||||
}else if (valType == Integer.class){
|
||||
val = Double.valueOf(val.toString().trim()).intValue();
|
||||
|
||||
@@ -193,7 +193,7 @@ jQuery.validator.addMethod("notStartZero",function(value, element) {
|
||||
}, "请填写正确的数值");
|
||||
//域名验证正则
|
||||
jQuery.validator.addMethod("domainCheck",function(value, element) {
|
||||
var regexp=/^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/;
|
||||
var regexp=/^[a-zA-Z0-9.-]*$/
|
||||
if(this.optional(element)||regexp.test(value)){
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ function abbr(name, maxLength){
|
||||
|
||||
/*筛选按钮初始化*/
|
||||
function filterActionInit() {
|
||||
|
||||
escapIntypeHtml();
|
||||
var isFilterAction = $("#isFilterAction").val();
|
||||
if(isFilterAction=="true") {
|
||||
fiterPanleShow();
|
||||
@@ -322,7 +322,12 @@ function filterActionInit() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*******配置界面中下拉选择检索条件,js使用el表达式赋值时存在html特殊字符未转换问题*********/
|
||||
function escapeIntypeHtml(){
|
||||
//首先使用html()方法将检索内容特殊字符转换,再次使用text()将转换后的正常字符串赋值给intype
|
||||
$("#intype").val($("#intype").html($("#intype").val()).text());
|
||||
$("#intype").html('');
|
||||
}
|
||||
function tzheight(){
|
||||
var hei=document.documentElement.clientHeight;
|
||||
hei=hei-91;
|
||||
|
||||
Reference in New Issue
Block a user