Re:Element: SetHTML() Method on MDN
by immibis on Wednesday October 22, 2025 @05:55PM
(#45675650)
By "sanitise" what's really meant is usually "escape". User typed their display name as <script>. You want the screen to say their display name, which is <script>. Therefore you send <script>. That's not their display name - that's just what you write in HTML to get their display name to appear on the screen. You shouldn't store it in the database in the display_name column.
[ Parent
| on HN ]