You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have an HTML entity in the text-content like this:
<a>a</a>
then:
window.document.getElementsByTagName('a')[0].textContent === "a"
will evaluate as true because a is the HTML entity for the character a.
Now if you use a non-strict HTML entity and by "non-strict" I mean HTML entities that are not semi-colon ; terminated, it won't get decoded to it's UTF-8 counter-part. e.g:
a should be decoded to the character a too
Most modern browser don't require semi-colon termination for HTML entities so I wanted to ask if this was a bug or just an intended behaviour.
The text was updated successfully, but these errors were encountered:
If you have an HTML entity in the text-content like this:
then:
will evaluate as
true
becausea
is the HTML entity for the charactera
.Now if you use a non-strict HTML entity and by "non-strict" I mean HTML entities that are not semi-colon
;
terminated, it won't get decoded to it's UTF-8 counter-part. e.g:a
should be decoded to the charactera
tooMost modern browser don't require semi-colon termination for HTML entities so I wanted to ask if this was a bug or just an intended behaviour.
The text was updated successfully, but these errors were encountered: