[Israel.pm] RegEx in HTML Character

Georges EL OJAIMI g-ojaimi at cyberia.net.lb
Mon Jan 28 09:57:12 PST 2008


Hello,

I am customizing my own RTE and trying to reduce it to only 4 few elements, in order to prevent HTML characters and SQL injection into the database, I modified the tags like the following:

[b]bold[/b]

[i]italic[/i]

[u]underline[/u]

[url=http://www.url.com]url[/url]

I want to replace each tag on the fly by its real HTML tag while displaying it to the end user.

Is there a way to replace all these tags by there equivalents? I am having problem detecting the brackets []

Best regards,
Georges




More information about the Perl mailing list