in reply to Textarea to edit HTML?

The CGI module provides Autoescaping and escapeHTML functions for just this purpose.

     Syntactic sugar causes cancer of the semicolon.        --Alan Perlis