Script and Link in SharePoint CQWP XSL Style Sheet

Help!  I added some script and link tags to my XSL style sheet for my Content Query Web Part, and now SharePoint has stopped working!

Problem

The main problem is not very obvious, but it’s basically that SharePoint is spitting out incorrect HTML, that your browser can’t render - so your browser starts guessing what the page should look like.  And since SharePoint 2010 relies heavily on javascript based client side objects, the ribbons, actions, web part zones all start to collapse once the page itself isn’t rendering correctly.

When you type in an XSL (XML) file:

SharePoint processes this as correct XML, but then proceeds to output:

SharePoint produced:

')" />

You will need to escape the characters ” [”] < [<] and > [>]

Discussions