How to store HTML tags like <style> in a textarea

jtenkate

Joined: 2010-12-06
Posts: 45
Posted: Fri, 2013-11-15 14:27

Hi, I'm busy working on an extended Basket module, containing configurable HTML e-mails.
One of the parts is the definition of e-mail templates. I'm using textareas to store the template HTML code.
The problem I ran into is that certain HTML tags like '<style>' and '<title>' are removed from the input and thus not stored in the DB.

I couldn't find a way to work around this problem. The workaround I used is manually replacing part of the HTML tags with a replacement string, eg. '<' is repaced with '$GT'. When the HTML template is used, the replacement string is reversed in the code to get the correct HTML. Obviously, from a user perspective this is not handy.

Is there a way to allow the mentioned tags in the textarea?

Regards,
Jeroen
www.kidsfotos.nl