XSLTs Not Displaying Content with Ampersands

  • Updated

If your site's content is missing from the front end of your site but shows in the workarea, you may have an issue with non-encoded characters and XSLTs. For example if you use the BlogEntries server control with blogentries.xsl (found at workarea/xslt/ ) explicitly set in the control, and you add an ampersand (&) to an HTML post for that blog, the control does not output the contents of the HTML post. If you do not specify an XSLT, the HTML post outputs as expected.

Steps to reproduce the issue:

  1. On a page with a blog server control, add the following property:
  2. Create a blog in the workarea.
  3. Add an HTML post and add the text HTML post .
  4. Note the blog ID of the blog folder and click the blog template in your browser:
  5. Confirm that HTML post shows up.
  6. Add an ampersand (&) to the HTML post .
  7. Reload the page. You should see that HTML post has disappeared.

XSLTs will not display content if there are unencoded ampersand characters.

Run the latest site cumulative update(CU) for 9.1SP1. You will need to both apply the CU and edit and publish existing content where the issue is present.

To identify which content has the issue, try running the following two scripts. If either script returns results, locate those content IDs in the workarea, then edit and publish them. This should encode the ampersand character.

SELECT content_id 
FROM content 
WHERE content_teaser like '%&%' AND NOT content_teaser like '%&%' 

SELECT content_id 
FROM content 
WHERE content_html like '%&%' AND NOT content_html like '%&%' 

The download, install instructions, and release notes can be found at /downloads.