logoalt Hacker News

afavouryesterday at 3:47 PM1 replyview on HN

> Who would ever want this?

Anyone who wants to provide some level of flexibility but within bounds. Say, you want to allow <strong> and <em> in a forum post but not <script>. It's not too difficult to imagine uses.


Replies

goatloveryesterday at 6:03 PM

Forums would already have code that sanitizes user input when it's submitted. Users aren't directly setting html elements.

show 1 reply