Gossamer Forum
Home : Products : Gossamer Links : Discussions :

How to fill out HTML Tag ...

Quote Reply
How to fill out HTML Tag ...
How to fill out all HTML Tag ... like <h1><script>....

When user add they data on the description from ?
Quote Reply
Re: [PDK1999] How to fill out HTML Tag ... In reply to
Do you want to include HTML in the description or?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] How to fill out HTML Tag ... In reply to
Sorry, my means is how to get out HTML Tag format at the description ,

that means is just let the user type text only on the description.
Quote Reply
Re: [PDK1999] How to fill out HTML Tag ... In reply to
You can use one of Paul's famous regex:

Code:
^(?:|[\w\.,&-\s]

Cheers
Klaus

http://www.ameinfo.com
Quote Reply
Re: [PDK1999] How to fill out HTML Tag ... In reply to
When stripping out html codes, we can accidentally take out required or allowed tags, too, so I try to avoid html stripping.

So my suggestion is different:
You should not strip out html tags from description, just not allowing < and > characters to be entered directly.
If you encode the < and > chars as html entity (&gt; and &lt;), the user will not able to use any html codes in the template.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] How to fill out HTML Tag ... In reply to
You would need a global to encode right?

Klaus

http://www.ameinfo.com
Quote Reply
Re: [klauslovgreen] How to fill out HTML Tag ... In reply to
Yeah, using a quick regexp.
However if we would talk about a separate perl script, the finest solution would be to use HTML::Entity.
I don't know if it's standard module or not. If it's standard since Perl v5.004, then could be even used in plugin or global, too.
Also I don't know if there is a GT equivalent module for that task...

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...