Output HTML Syntax Characters from RSS Feeds to Preview Correctly for Cascade

By | 2019-09-06T09:25:33+00:00 September 6th, 2019|Categories: Web Development|Tags: , , , |

Est. Reading Time: 2 minute

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(“&lt;”, “<“).replaceAll(“&gt;”, “>”)

About the Author:

Zedric Myers
Zedric Myers is a Web Designer for Beacon Technologies. After earning his degree in Advertising and Graphic Design, he spent 11 years with an advertising agency in Greensboro, NC where he was initially hired as a designer and transitioned to being a Web Developer.