Output HTML Syntax Characters from RSS Feeds to Preview Correctly for Cascade
Published September 6, 2019 | Categories: Web Development
This applies to Cascade Velocity formats. If you’ve ever had to pull in content through an external feed that has rich HTML, this piece of code may help you. Sometimes you may see HTML tags or code output into the content of the page. Such as, <Content goes here.>.
This code will take the HTML syntax you would like to replace and output as standard HTML tags, so that when a user looks at the page, it’s properly formatted for them using the HTML provided in the feed.
With this code you can continue to add or daisy chain replaceAll code, as needed.
Example code to update:
$_SerializerTool.serialize($departmentContent, true).replaceAll("<", "<").replaceAll(">", ">")