Articles in this section

Remove rich text or HTML markup from RTF fields

This article explains how to use a handlebars expression to remove rich text or HTML markup from RTF fields. If an RTF field in your source application maps to a plain text field in your destination application, you can use this solution to remove the unwanted formatting.

Sample data:

<b>Testing <u>testing&nbsp;</u><font size="2">&nbsp;</font><font size="1">testing&nbsp;</font></b><a href="http://example.com" target="_blank">testing</a>

The following handlebars expression uses regular expressions to remove the unwanted tags from the sample data:

{{{regexReplace field.name "" "(&nbsp;|<([^>]+)>)" "ig"}}}

360055901052-stripHandlebars.png