I have a simple Rich Text custom field but it's di...
# suitecommerce
r
I have a simple Rich Text custom field but it's displaying html tags on the site. Any ideas?
d
it's displaying the html tags as entities, you mean? what if you look at the field in "Source editing mode"
r
Yeah it's almost like it's displaying as a string...
s
Displaying where? On the frontend of the webstore?
r
Size: 8.5" x 14" folds to 7" x 8.5"
instead shows <p><b>Size</b>: 8.5" x 14" folds to 7" x 8.5"</p>
on the site
yes, the front end
s
Yeah so when you put that in a field and try to surface it on the frontend, it will be interpreted as a string by the templating engine. This is deliberate for security reasons.
You will need to tell the template engine to expect 'safe' HTML
r
oh ok
s
I believe the correct thing to do is to wrap your keyword in triple brackets but I honestly don't remember exactly
eg
{{{myCustomField}}}
r
ok i'll try that
worked, thanks!
s
no problemo
(just make sure that that HTML remains safe; for example, don't open yourself up to an XSS by allowing that HTML to be set by a URL parameter)
👍 1