Last modified: 2011-05-23 14:13:16 UTC
In the diff above, the sections which contains source code in <source lang="php"> tags are not being properly formated (GeSHi). The code is displayed as if it were in <pre> tags. I believe this is another consequence of the page content being loaded via AJAX (bug 25289). See also another similar bug: https://secure.wikimedia.org/wikipedia/mediawiki/w/index.php/?diff=386071&oldid=367003
That is right, some javascript previews has the same problem (bug 24134, bug 24162). That are the "headitems" of action=parse (bug 22061).
Created attachment 8271 [details] Best guess at bug
using innerHTML += causes the html to be re-entered, dom elements re-created etc. could cause unexpected behaviour + would break any events to elements in there (although that's probably rare in the <head>). use appendChild instead ( or $('head').append( htmlcodehere ) ). And, although not specific to this patch, using JSON instead of XML from the API is probably a good idea.
Created attachment 8272 [details] v2
r83552
Fixed in r88639.