html防止注入转译,增加不断开空格(nbsp)转译

This commit is contained in:
LuisStruggle
2022-11-24 10:53:32 +08:00
parent c72757b813
commit 31bcd02732
4 changed files with 17 additions and 5 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 = " ";