<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>In some circumstances, I'm getting a '0x0' character at the end of the class attribute in my webpage.</div><div>This character is interfering with class matching for rendering and jQuery selection. In xhtml mode, it even crashes the page parsing.</div><div><br></div><div>Here is an example of class attribute with the 0x0 char:</div><div><br></div><div><meta charset="utf-8"><span class="Apple-style-span" style="font-family: Menlo, monospace; font-size: 11px; white-space: nowrap; -webkit-text-size-adjust: none; "><span class="webkit-html-attribute-name" style="box-sizing: border-box; color: rgb(153, 69, 0); text-decoration: none !important; ">class</span>="<span class="webkit-html-attribute-value" style="box-sizing: border-box; color: rgb(26, 26, 166); text-decoration: none !important; ">decoration status-confirmedoption decoration-VerhuurA groupstart group-1283859969 group-1558129409� ui-selectee ui-droppable ui-draggable ui-selected</span>"</span></div><div><br></div><div>The classes after the 0x0 character were added by jQuery after page load.</div><div><br></div><div>Although I can repeat the problem deterministically, I do not find the discriminating behavior with respect to class attributes of other elements.</div><div>The most common factor I found is that the character gets inserted when the string is 99 characters long.... add or remove a character and the 0x0 goes away.</div><div><br></div><div>The really strange part is that:</div><div>- I do not see the character when inspecting the response string that is served on the server</div><div>- I do not see the character when using an HTTP client (Zinc) to get the raw response</div><div>- I do not see the character in the page source when choosing 'page source' from the developers menu in Chrome</div><div>But maybe the above is just because character encoding is covering up for it...&nbsp;</div><div><br></div><div>The problem occurs both on Firefox and Chrome, even with javascript turned off (to ensure that it's the bare page rendering).</div><div><br></div><div>Does this ring a bell with anyone?</div><div><br></div><div>Johan</div></body></html>