开发者

Is it possible to omit escaping some html in <c:out value="${str}">?

开发者 https://www.devze.com 2023-02-02 14:16 出处:网络
I want make secure display (escaping html characters with c:out) but allow some links (<img> <a href>开发者_高级运维 and youtube embedded). How can I do this? Is it possible achieve this w

I want make secure display (escaping html characters with c:out) but allow some links (<img> <a href>开发者_高级运维 and youtube embedded). How can I do this? Is it possible achieve this with c:out?


Use escapeXml

<c:out value="${test}" escapeXml="true" />

To prevent XSS attacks also look at JSoup Cleaner

0

精彩评论

暂无评论...
验证码 换一张
取 消