[dev] Re: [cvs] commit: horde/templates/prefs select.inc

Jan Schneider jan@horde.org
Wed Oct 30 14:59:43 2002


Zitat von Chuck Hagenbuch <chuck@horde.org>:

> Quoting Jan Schneider <jan@ammma.de>:
> 
> >   Log:
> >   These values must not be passed through htmlspecialchars(). The
> >   language selection widget wouldn't work across all charsets.
> 
> This is a dangerous change, though, and might break all kinds of other
> things counting on the prefs api to do the right thing. 

I don't think it'll break _too_ much as this call was inserted a very short
time ago and wasn't even merged to RELENG_2. If html entities are necessary
they have to be created in the code using the select pref because:

> What exactly was
> this breaking, and how can we fix it in the language select instead?

The situation before my patch was: We had entities in nls.php but as these
values were passed through htmlspecialchars() the entity strings were
displayed, not the special characters.

We have to use entities in the $nls array because that's the only way to
safely display the iso-8859-1 characters from the language list within all
charsets.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft