Question

I'm currently working on optimizing a clients website for all big browsers (IE, FF, Safari, Chrome, Opera) and I've encountered unsolveable issues (for me at least) here regarding the CQWP & ListViews which uses XSLT to render content.

In IE everything looks perfect, not a single flaw. But as soon as I open the pages containing CQWP's in any other browser everything in these webparts looks like a bomb exploted in them.

E.g.

<a href="whatever" class="someClass">
    <div class="someOtherClass">
        <div class="iLikeTurtles1"> Content 1 </div>
        <div class="iLikeTurtles2"> Content 2 </div>
        <div class="iLikeTurtles3"> Content 3 </div>
    </div>
</a>

When rendered in FF the HTML to this looks like this:

<a href="whatever" class="someClass">
    <div class="someOtherClass">
    <a href="whatever" class="someClass">
        <div class="iLikeTurtles1"> Content 1 </div>
    </a>
    <a href="whatever" class="someClass">
        <div class="iLikeTurtles2"> Content 2 </div>
    </a>
    <a href="whatever" class="someClass">
        <div class="iLikeTurtles3"> Content 3 </div>
    </a>
    </div>
</a>

I know that SharePoint overall is optimized for IE, but how come such simple HTML can be rendered so bad by other browsers? Does FF and the other browsers read XSLT differently than IE?

Was it helpful?

Solution

Dandroid,

Are you sure you're not looking at some kind of caching problem? I've worked with the CQWP and XSLT many times and I use FF and IE. I have never seen this kind of behaviour.

As far as I know, SharePoint doesn't render different HTML for different browsers. If so, I'd like to know :) Anyway, the HTML you generate through XSLT should be the same in each browser.

Perhaps you need to look at the status of your XSLT file. Is it published?

OTHER TIPS

I'd also double and triple check you have no unclosed tags in your XSLT, as browsers treat those differently in their DOMs.

In CQWP the XSLT is processed at server side and html is passed on to browsers.
So the problems you are facing should be because of improperly formed html.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top