3 ms·
HN is a web page, and HTML swallows multiple-spaces into a single space.
by mikewhy 9y ago
HN is a web page, and HTML swallows multiple-spaces into a single space.
- thanatropism 9y agoLet me test something. Edit: crap, doesn't work
- arianon 9y agoI'm pretty sure that if HN allowed you to do what you just tried, it would be a XSS vulnerability. :P
- Stratoscope 9y agoNah, you can do it on Reddit because they use Markdown instead of HN's homegrown comment formatter. In case you ever need to post a proportional font code sample over there, the trick is to use for all the leading spaces, and also add two regular spaces at the end of each line before the last one.
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- problems 9y agoUnicode has some wonky characters - I use zero-width space, probably the most ridiculous of them to bypass filters at times. For intentionally wide spaces you have a few options: Test unicode non-breaking space. Test unicode narrow no break space. Test unicode figure space. EDIT: So there you have it, if you want a non-breaking space on hackernews, use unicode's figure space or narrow non-breaking space. Apparently they already filter out the normal non-breaking space.
- mkl 9y agoPlease don't do this. It's unreadably broken on mobile Chrome (turns into a gigantically wide space).