6 ms·
But when it's actually leaked and posted, it'll most definitely be trimmed.
by michaelhart 16y ago
But when it's actually leaked and posted, it'll most definitely be trimmed.
- roel_v 16y agoYou could use a pattern of one or two spaces after each sentence. Encode an id in that. If text is copy and pasted and not processed with a s/ / /g, that most likely won't be detected by the copy-and-paster (especially when it's all done in a variable width font).
- roel_v 16y agoLooks like HN does remove double spaces, what I meant was obviously s/[space][space]/[space]/g :)
- modeless 16y agoIt's not HN, it's a feature of HTML. All whitespace characters (including tabs and newlines) are condensed to a single space, and leading/trailing spaces are removed. So if you have a habit of double-spacing after sentences, HTML simply ignores you, unless you use <pre> or .
- roel_v 16y agoAh didn't know that. Well that would make the single/double space encoding of an id much harder.
- grncdr 16y agoActually, it makes it more effective if anything. The browser displays it as a single whitespace, but the source isn't altered, (and therefore easily checkable).
- roel_v 16y agoYeah but if a user copy/pastes it from his email client into his blog posting system, the double spaces are stripped, too (I checked it with Firefox, maybe other browsers work differently). It would only work I think if the single/doubles space pattern was preserved across copy/paste operations.