配置新增、更改时增加不可见字符过滤(\t\r\n)
This commit is contained in:
@@ -280,6 +280,9 @@ public class BaseController {
|
||||
binder.registerCustomEditor(String.class, new PropertyEditorSupport() {
|
||||
@Override
|
||||
public void setAsText(String text) {
|
||||
Pattern p = Pattern.compile("\t|\r|\n");
|
||||
Matcher m = p.matcher(text);
|
||||
text = m.replaceAll("");
|
||||
setValue(text == null ? null : StringEscapeUtils.escapeHtml4(text.trim()));
|
||||
}
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user