I don't aggree with your solution. Ok, it is easy to install & works, but it will block even those characters, what user wants in his text, but which are no html tags.
My opinion is to encode any special character to html entity so the user will not able to put any html strings in your text. If the user puts html into the text, it will display as text.
E.g.:
< should encode into <
> should encode into: >
& should encode to: &
This way, any html will display as text.
The best known solution, to stop users to post html.
Currently I use this encoding way on my working site, under Links v2.0.
Therefore I'm sure I will also implement this into one of my planned plugins. Probably to a plugin which is related to Link adding (maybe under the name of
"Link Posting Tools" plugin).
It may be available as separate plugin or as plugin for my upcoming
Extended Links plugin.
Link Posting Tools plugin will probably have features like:
- html protection,
- link preview,
- maximum Description length allowed,
- error checking features of filled fields,
- setting required fields,
- setting one required field of X fields,
- etc. (you may ask).
Of course all features will be optional.
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...