Per this post - "SharePoint has the Content Query web part, which is a control that allows a user to display an aggregated list of items based on some criteria. You can choose to return items from all sites within a site collection or from a specific list; all based on a list type and content type. You also get a few different display options, but if you try to return an Enhanced Rich Text field, that is to say some HTML and CSS Styling, the results are a bit funky. The HTML markup is actually encoded"

The post has a solution that involves changing the XSL, but my fear with doing that is for some reason we receive some type of upgrade my XSL would be overwritten with the company default and my site collection would start to display the HTML.

Is there a way to to accomplish this using javascripty not javaquery wthin the script editor found in a CQWP.

1 Answer 1


Because you are editing the ItemStyle.xsl  in the site style library rather than the physical server copy, you won't be running the risk of a patch or cumulative update overwriting your XSL changes. When you edit ItemStyle.xsl  per your linked article, the overrides are stored in the content database and become what is referred to as unghosted. With the exception of a major version upgrade such as 2013 to 2016, your changes are safe. Even with a major version upgrade, you'd still have the option to retain the old UI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.