YUI IE Hack

Re: YUI IE Hack

by Paul Nicholls -
Number of replies: 0

Hi Simon,

Given what Sam has said, and having had a look at the surrounding code and the history of that bit, I'd say that it should really have been text/javascript all along - but because it was in the context of outputting stylesheets, the developer didn't think to change it from text/css (which every other tag output by that function is).  As Sam said, only the ID really matters - it could probably be replaced by just about any other element that's valid within the head, as long as it's not also affected by the IE issue which it's there to work around...

If it's not easy to replicate, I'd still suggest creating a tracker ticket - just explain what you see happening, that you can't quite work out what it is that's stripping it out (I'd suspect a firewall of some kind trying to prevent script injection - it sees the mismatch between the script tag and the text/css type attribute, and decides that somebody's trying to pull off some kind of XSS attack or something) and that you're unable to find any negative side-effects of making the change; maybe include a link back to this thread (and add a link here to the tracker ticket) for reference.

-Paul

Average of ratings:Useful (1)