cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

HTML from Entity field

Hello-

 

I know with Liquid you can access the data in a field of a retrieved entity to display in a web page, but what if the data in question is HTML/CSS/JS? Will Portal dump the raw code to the page or will it escape the special characters and show the literal text rather than functional HTML?

 

Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Hi

 

are you rendering your field with HTML via Liquid? if yes, the default behavior is rendering as HTML itself

so you can have the data in your CDS using HTML and simply display on the portal using the syntax {{ yourobjectname }}

if you want to display raw HTML, you can use the filter | escape: {{ yourobjectname | escape }}

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

1 REPLY 1
Super User II
Super User II

Hi

 

are you rendering your field with HTML via Liquid? if yes, the default behavior is rendering as HTML itself

so you can have the data in your CDS using HTML and simply display on the portal using the syntax {{ yourobjectname }}

if you want to display raw HTML, you can use the filter | escape: {{ yourobjectname | escape }}

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Apps Portals Super User


Oliver Rodrigues


 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Users online (30,950)