Reputation: 215
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?
Upvotes: 2
Views: 896
Reputation: 240870
Use escapeXml
<c:out value="${test}" escapeXml="true" />
To prevent XSS attacks also look at JSoup Cleaner
Upvotes: 3