[dev] [PATCH] Little bug in imp/contacts.php javascript

Chuck Hagenbuch chuck at horde.org
Mon Dec 15 20:05:27 PST 2003


Quoting Etienne Goyer <etienne.goyer at linuxquebec.com>:

> In imp/contacts.php, when selecting a contact and clicking a localized
> "To", Cc" or "Bcc" and this one contain 8 bits character, it does not
> work.  I don't know Javascript enough to explain why but the following
> two trivials patch fixed it for me and I can't see anything wrong with
> them.  They basically change the content of a Javascript variable with
> which the user does not interact.

First of all, there's no reason to escape into PHP in order to echo a constant
string.

jsVar = '<?php echo "To" ?>';

is just a really really painful way to write:

jsVar = 'To';


Also, I'm not convinced this is necessary. Try doing <?php echo
addslashes(_("To")) and see if that works for you.

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
"I'm really... I'm not too fascinated by green food." - Average Joe


More information about the dev mailing list