diff --git a/src/main/java/com/nis/util/excel/ImportBigExcel.java b/src/main/java/com/nis/util/excel/ImportBigExcel.java index 71a39afad..1425d8074 100644 --- a/src/main/java/com/nis/util/excel/ImportBigExcel.java +++ b/src/main/java/com/nis/util/excel/ImportBigExcel.java @@ -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(); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js index 645ec890f..15123c1b4 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js @@ -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; } diff --git a/src/main/webapp/static/global/scripts/jeesite.js b/src/main/webapp/static/global/scripts/jeesite.js index 1ae873ff2..42ef1bc72 100644 --- a/src/main/webapp/static/global/scripts/jeesite.js +++ b/src/main/webapp/static/global/scripts/jeesite.js @@ -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;