Browse Source

项目名称含html转义字符的进行处理

user5 4 năm trước cách đây
mục cha
commit
d147a812e9

+ 7 - 2
src/main/java/com/jeeplus/modules/workfullmanage/web/WorkFullManageController.java

@@ -56,6 +56,7 @@ import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
 import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
 import freemarker.template.Configuration;
 import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -1149,7 +1150,9 @@ public class WorkFullManageController extends BaseController {
 		}else{
 			data.put("number",projectReportData.getNumber()+" 号");
 		}
-		data.put("projectName",ruralProjectRecords.getProjectName());
+		//项目名称含html转义字符的进行处理
+		String newJson = StringEscapeUtils.unescapeHtml4(ruralProjectRecords.getProjectName());
+		data.put("projectName",newJson);
 		//咨询类别
 		data.put("consultType",consultType);
 		//委托单位
@@ -1419,7 +1422,9 @@ public class WorkFullManageController extends BaseController {
 		data.put("constructionUnitsName",constructionUnitsName);
 		//项目名称
 		if (StringUtils.isNotBlank(ruralProjectRecords.getProjectName())){
-			data.put("projectName",ruralProjectRecords.getProjectName());
+			//项目名称含html转义字符的进行处理
+			String newJson = StringEscapeUtils.unescapeHtml4(ruralProjectRecords.getProjectName());
+			data.put("projectName",newJson);
 		}else {
 			data.put("projectName","");
 		}