Strip HTML characters using Liquid in PowerApps/ Dynamics 365 Portals

I have been working lately a lot on PowerApps portals and one of the requirement that we got from customer is to render some HTML text as text in Portals. The customer had a field in Dynamics 365 which was storing rich text.

We would retrieve the field value using fetchxml in liquid and the requirement was to strip the HTML characters and show the text in plain text. We did that initially in JS, only to realize later that there is a specific filter available in liquid – “strip_html”.

And guess what it worked like a charm.


{{ “<span>This liquid filter <b>can work wonders</b> with stripping HTML<br />” | strip_html}}


This liquid filter can work wonders with stripping HTML

As I am working more and more on liquid, I am simply falling in love with it. Simple yet quite powerful language. And as I keep exploring, I will post some interesting stuffs over the next few weeks.

Hopes this helps!

Debajit Dutta

(Dynamics MVP)

For consultation/ corporate training visit or reach out to us at

Our product offerings:

CRM-Sharepoint Attachment uploader and metadata manager (

Notes Manager (

Role based views for Dynamics 365 (

Record Cloner for Dynamics 365 (

Leave a Reply