

5·
7 months agoYou can’t parse every html opening tag with regex, because a html opening tag doesn’t have a set structure. How would you match, with regex, this opening tag?
<mytag myattribute="<value of \"myattribute\">" >
You can’t parse every html opening tag with regex, because a html opening tag doesn’t have a set structure. How would you match, with regex, this opening tag?
<mytag myattribute="<value of \"myattribute\">" >
It can’t be done, as an opening tag in html can contain anything in its attributes, even JavaScript (e.g. onclick handler).
let’s not lose focus of what’s important here, and that is a room full of people hearing my voice and paying attention to me for as long as I manage to hold it
The quote must not be escaped when you start with a single quote. The rest doesn’t. This is valid and tested:
<img alt='my "<img>"'>