|
@@ -7,6 +7,7 @@ import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.Map.Entry;
|
|
import java.util.Map.Entry;
|
|
|
|
+import java.util.regex.Matcher;
|
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -310,7 +311,8 @@ public class ExamServiceImpl implements ExamService {
|
|
|
|
|
|
|
|
|
|
if (null != beforeExamRemark) {
|
|
if (null != beforeExamRemark) {
|
|
- String simpleText = Jsoup.clean(beforeExamRemark, Whitelist.simpleText());
|
|
|
|
|
|
+ Document doc = Jsoup.parse(beforeExamRemark);
|
|
|
|
+ String simpleText = doc.wholeText();
|
|
if (simpleText.length() > 800) {
|
|
if (simpleText.length() > 800) {
|
|
throw new StatusException("001002", "考前说明内容不得超过800个字符");
|
|
throw new StatusException("001002", "考前说明内容不得超过800个字符");
|
|
}
|
|
}
|
|
@@ -322,7 +324,8 @@ public class ExamServiceImpl implements ExamService {
|
|
|
|
|
|
String afterExamRemark = properties.get("AFTER_EXAM_REMARK");
|
|
String afterExamRemark = properties.get("AFTER_EXAM_REMARK");
|
|
if (null != afterExamRemark ) {
|
|
if (null != afterExamRemark ) {
|
|
- String simpleText = Jsoup.clean(afterExamRemark, Whitelist.simpleText());
|
|
|
|
|
|
+ Document doc = Jsoup.parse(afterExamRemark);
|
|
|
|
+ String simpleText = doc.wholeText();
|
|
if (simpleText.length() > 800) {
|
|
if (simpleText.length() > 800) {
|
|
throw new StatusException("001002", "考后说明内容不得超过800个字符");
|
|
throw new StatusException("001002", "考后说明内容不得超过800个字符");
|
|
}
|
|
}
|
|
@@ -334,7 +337,8 @@ public class ExamServiceImpl implements ExamService {
|
|
|
|
|
|
String cheatingRemark = properties.get("CHEATING_REMARK");
|
|
String cheatingRemark = properties.get("CHEATING_REMARK");
|
|
if (null != cheatingRemark) {
|
|
if (null != cheatingRemark) {
|
|
- String simpleText = Jsoup.clean(cheatingRemark, Whitelist.simpleText());
|
|
|
|
|
|
+ Document doc = Jsoup.parse(cheatingRemark);
|
|
|
|
+ String simpleText = doc.wholeText();
|
|
if (simpleText.length() > 800) {
|
|
if (simpleText.length() > 800) {
|
|
throw new StatusException("001002", "作弊说明内容不得超过800个字符");
|
|
throw new StatusException("001002", "作弊说明内容不得超过800个字符");
|
|
}
|
|
}
|