You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to py4web
I have an html formatted text in a field in the database.
How do I display it as html and not as raw html ?
in other words:
In the database the text is <b>Hello</b>
On the form I want it to show : Hello
icodk
unread,
Nov 14, 2023, 6:57:09 AM11/14/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to py4web
Well: I found out that I can use: <pv-html="product.description"></p>
This will effectively render html tags as html
Massimo
unread,
Nov 15, 2023, 1:20:46 AM11/15/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to py4web
That works assuming product.description is a Vue variable. In that case {{{product.description}}} also works.
If instead your HTML is in a python variable and you are using yatl templates (default in py4web) you could do [[=XML("<p>Hello</p>")]] or safer [[=XML("<p>Hello</p>", sanitize=True)]] which will remove any bad stuff that may be in the HTML.
icodk
unread,
Nov 15, 2023, 6:03:53 AM11/15/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message