You are viewing a single thread.
View all comments View context
7 points

It can’t be done, as an opening tag in html can contain anything in its attributes, even JavaScript (e.g. onclick handler).

permalink
report
parent
reply
-1 points

??? Non sequitur

permalink
report
parent
reply
5 points

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\">" >

permalink
report
parent
reply
0 points
*

Is this valid HTML? My understanding is that that attribute value needs to be escaped, i.e. &lt;value of \&quot;myattribute\&quot;&gt;.

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 4.3K

    Monthly active users

  • 945

    Posts

  • 10K

    Comments

Community moderators