Merge pull request #2755 from LuisStruggle/v5-dev

HtmlUtil中escape方法,增加不断开空格(nbsp)转译,防止xss攻击
This commit is contained in:
Golden Looly
2022-11-28 10:23:11 +08:00
committed by GitHub
4 changed files with 18 additions and 6 deletions

View File

@@ -176,7 +176,7 @@ public interface StrPool {
/**
* 字符串常量HTML 空格转义 {@code " " -> " "}
* 字符串常量HTML 不间断空格转义 {@code " " -> " "}
*/
String HTML_NBSP = XmlUtil.NBSP;

View File

@@ -67,7 +67,7 @@ import java.util.Map;
public class XmlUtil {
/**
* 字符串常量XML 空格转义 {@code " " -> " "}
* 字符串常量XML 不间断空格转义 {@code " " -> " "}
*/
public static final String NBSP = " ";