tags:

views:

92

answers:

3

I'm working on a site where these bugs randomly appear in Safari and Chrome:

Safari

i.e. tags appear not to have been closed off completely. The problem is when I view the source I discover it's completely valid.

Edit Here's the offending HTML which I saved: http://www.pastebin.com/f1e0edd24

+2  A: 

Are you SURE it is completely valid? Also, whichever editor you view it in might be hiding something from you. It looks like something got escaped or encoded that shouldn't have been. Take a look at the source for the list item that is bad and compare that to a valid one. Try and find the difference between them.

Also, view the response in Fiddler to analyze the actual response html before it hits the browser. This should help reveal if it is actually the browser or is some escaping/encoding issue like I mentioned before.

Polaris878
Yes that was also the first thing what i thought.
streetparade
It's completely valid. These problems only occur in Safari and Chrome
Zahymaka
so in firefox and IE it renders fine?
Polaris878
Yes. It just randomly appears and I've had a friend confirm the html is valid.
Zahymaka
+1  A: 

Try to export all your if else statements from the onclick event handler to a function. Then call this function. That makes the read of the source clearer and makes it easy to debug. However the html may be not valid, somewhere is some attributes not closed correctly. To help further we need the following information. Does the Bug appear on all Browsers?

streetparade
Haha I can't believe I forgot to tell him to try other browsers +1
Polaris878
+2  A: 

In the example you've given, it seems you have a sneaky arrow just before "onclick" like this "> onclick .... >Kusters Rebecca." Hence it displays instead of failing.

This problem would show up in all browsers.

Tom