[Catalyst] html escaping question

Carl Franks fireartist at gmail.com
Wed Mar 21 14:01:04 GMT 2007


On 21/03/07, Mario Minati <mario.minati at googlemail.com> wrote:
> Am Mittwoch 21 März 2007 12:42 schrieb Carl Franks:
> > In which case you may be double-escaping.
>
> But how can I circumvent this. Actually it's not a clever question.
> Is it usefull to circumvent that.
>
> My current problem:
> As the part of my project I am working on at moment deals with companies I
> have to deal with "GmbH & Co. KG" which is a quite popular type of company in
> Germany.
>
> If a users types that in a form field everything is fine until it comes to
> editing. The string is escaped - of course. But the user is confused when he
> sees "GmbH &amp; Co. KG".

Find out which part of your app is double-escaping, and stop it.
If your template has just [% form %] there shouldn't be any problem.

By default, a field with:
    default_value('GmbH & Co')
will render as:
    value="Gmbh &amp; Co"
the user will see the value as:
    GmbH & Co
and when it's submitted, the server will see:
    GmbH & Co



More information about the Catalyst mailing list