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
Tidy's behavior here is turning incorrect html into correct html. I'd have to say though that I've never liked the readability of those & character entities, and I much prefer the use of ;, which is blessed by the CGI spec as an alternative to the ampersand in query strings.
Well... I've never seen it converted to & in the href attribute; in fact the wikipedia entry on query strings indicates that either '&' or ';' (as mentioned by @mc0e above) is allowed. I'm not worried about viewing the ampersand; I want it to just be the delimiter for and the next key/value pair. it may view better, but from a programming perspective, it makes it harder to see what's going on -- the ';' is easy to miss (I've made that mistake before :=)
& is correct in the query string, but to represent an & in html, you write it as a character entity. With html, an unescaped & is usually not the start of something that looks like a defined character entity, and browsers deal with that. In XHTML though it violates the requirement of being well formed XML, and the browser is required to reject it.
Input HTML
<a class="m-j-cm-link" href="/shop/womens-clothing?id=118&edge=hybrid&aen=true&cm_sp=mew_us_homepage-_-slot1-_-Women">
Output tidied HTML
"/shop/womens-clothing?id=118&edge=hybrid&aen=true&cm_sp=mew_us_homepage-_-slot1-_-Women">
I couldn't see an option to turn off this behavior...
The text was updated successfully, but these errors were encountered: