Some libraries for doing that with good defaults:
- https://github.com/cure53/DOMPurify
- https://github.com/apostrophecms/sanitize-html
- https://github.com/bevacqua/insane
(right now your site looks vulnerable to XSS)
Ah, I bet you discovered that subdomains aren't case-sensitive while HN usernames are case-sensitive, didn't you? :)
> That username conflicts with an existing one. Names are case-insensitive. Please choose another.
https://news.ycombinator.com/user?id=Retr0id - 200
https://news.ycombinator.com/user?id=retr0id - 404 (Edit: 200 now?)
The firebase API on the other hand remains case-sensitive:
https://hacker-news.firebaseio.com/v0/user/Retr0id.json => full response
https://hacker-news.firebaseio.com/v0/user/retr0id.json => null
- https://news.ycombinator.com/threads?id=Retr0id - Works
- https://news.ycombinator.com/threads?id=retr0id - Doesn't work
Which somehow I guess the API is using.
Markdown Content
...
```
-- BEGIN PGP...
https://news.ycombinator.com/user?id=yourname
yourname.at.hn
--- signature
```