zlacker

[return to "What's up with all those equals signs anyway?"]
1. ruhith+Vh[view] [source] 2026-02-03 11:56:40
>>todsac+(OP)
The real punchline is that this is a perfect example of "just enough knowledge to be dangerous." Whoever processed these emails knew enough to know emails aren't plain text, but not enough to know that quoted-printable decoding isn't something you hand-roll with find-and-replace. It's the same class of bug as manually parsing HTML with regex, it works right up until it doesn't, and then you get congressional evidence full of mystery equals signs.
◧◩
2. lvncel+Ko[view] [source] 2026-02-03 12:40:16
>>ruhith+Vh
> It's the same class of bug as manually parsing HTML with regex, it works right up until it doesn't

I'm sure you already know this one, but for anyone else reading this I can share my favourite StackOverflow answer of all time: https://stackoverflow.com/a/1732454

◧◩◪
3. perchi+oi1[view] [source] 2026-02-03 17:08:45
>>lvncel+Ko
It took me years to notice, but did you catch that the answer actually subtly misinterprets what the question is asking for?

Guy (in my reading) appears to talk about matching an entire HTML document with regex. Indeed, that is not possible due to the grammars involved. But that is not what was being asked.

What was being asked is whether the individual HTML tags can be parsed via regex. And to my understanding those are very much workable, and there's no grammar capability mismatch either.

◧◩◪◨
4. tiagod+gl1[view] [source] 2026-02-03 17:22:57
>>perchi+oi1
I think even for single opening tags like asked there are impossible edge cases.

For example, this is perfectly valid XHTML:

    <a href="/" title="<a /> />"></a>
◧◩◪◨⬒
5. chungy+QX1[view] [source] 2026-02-03 19:52:59
>>tiagod+gl1
No, that is not valid. The "<" and ">" characters in string values must always be escaped with &lt; and &gt;. The correct form would be:

    <a href="/" title="&lt;a /&gt; /&gt;"></a>
[go to top]