Gossamer Forum
Home : Products : DBMan : Customization :

Html markup in data

Quote Reply
Html markup in data
I know I've seen this but I can't find it now for the life of me.

I've got html markup in certain database fields....this includes <tr> <td> when I display the fields I want them to display text, hopefully including the markup....but without actually using the html, no trying to make tables and rows and stuff.....thank you.

steven
Quote Reply
Re: [steven99] Html markup in data In reply to
You'll need to translate the < and > characters when you print out your record.

Put the following at the beginning of sub html_record

$rec{'fieldname'} =~ s/</&lt;/g;
$rec{'fieldname'} =~ s/>/&gt;/g;


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Quote Reply
Re: [JPDeni] Html markup in data In reply to
Thank you, JP. You answered some questions for me 2/3 years ago as well. Nice to see some things don't change.

steven