cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Memorable Member
Memorable Member

Re: HTML from Entity field

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.

View solution in original post

1 REPLY 1
Highlighted
Memorable Member
Memorable Member

Re: HTML from Entity field

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.

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (8,066)