2 ms·
Maybe worth mentioning tangentially related WTH of JS syntax: that there are two additional line breaks besides CR and LF: line separator (\u2028) and paragraph
by myfonj 5y ago
Maybe worth mentioning tangentially related WTH of JS syntax: that there are two additional line breaks besides CR and LF: line separator (\u2028) and paragraph separator (\u2029).
Some editors and text viewers render them as zero width spaces, so you can see something that seems like innocent line comment but what is actually executed:
data:text/html;charset=utf-8,<script>//%E2%80%A9alert(1)</script>
view-source of that document displays just `<script>//alert(1)</script>` in Firefox. In Chrome there is "P SEP" in dashed rectangle between `//` and `alert`, so you at least get a hint there is something fishy.