multibyte bug in @escape:htmlall ?

Found a bug? Tell us!!
Post Reply
sniff
Regular
Posts: 8
Joined: Tue Jun 20, 2006 9:54 am
Contact:

multibyte bug in @escape:htmlall ?

Post by sniff »

Hi
I've found that there is probably bug in the @escape:htmlall when using multibyte encoding (UTF-8). The text in alert() window is broken. You can see at http://syslog.eu/archives/32-Solaris-Vo ... disku.html by clicking on link "Odezva ze specifického URI na tento záznam"

The code is:
templates/contest/entries.tpl: <a rel="nofollow" style="font-weight: normal" href="{$entry.link_trackback}" onclick="alert('{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape:htmlall}'); return false;" title="{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}" >{$CONST.TRACKBACK_SPECIFIC}</a>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: multibyte bug in @escape:htmlall ?

Post by garvinhicking »

Hi!

Yes, you are right - the browsers seem to not copy with HTML entities in the alert() one. Could you try if it works with just "escape:html"?

Sadly this bug would then be in many templates and it's not possible to fix it in the PHP code, but only in the templates. :-/

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
sniff
Regular
Posts: 8
Joined: Tue Jun 20, 2006 9:54 am
Contact:

Re: multibyte bug in @escape:htmlall ?

Post by sniff »

Hi Garvin!
garvinhicking wrote:the browsers seem to not copy with HTML entities in the alert() one.
I don't think it is a problem of browsers, because word "Kopírovat" in the source code of that page is:

Kopírovat instead of Kopírovat

Which seems to be a problem with wrong multibyte (UTF-8) translating into HTML entities (it outputs 2 chars instead of 1)

Anyway, "escape:html" solves the problem and works fine in my Firefox/Opera/Mozilla browsers.

Vasek
Post Reply