PDA

View Full Version : show_popup_menu display problem


nonaka_nona_to
09-10-2007, 11:06
Hello.

There is a display problem in Japanese, shown by JavaScript function show_popup_menu.

OnClick() display strings passed are processed at CTag::AddAction() in file ctag.inc.php.

PHP function htmlentities() has default charset ISO-8859-1.

By adding charset locale constant S_HTML_CHARSET to htmlentities(), the problem resolved.
It should work both cn and ru.

Below is the small patch.

Sincerely.

# diff -u php/include/classes/ctag.inc.php.orig php/include/classes/ctag.inc.php
--- php/include/classes/ctag.inc.php.orig 2007-10-05 23:38:54.000000000 +0900
+++ php/include/classes/ctag.inc.php 2007-10-09 16:11:36.000000000 +0900
@@ -254,7 +254,7 @@
function AddAction($name, $value)
{
if(!empty($value))
- $this->options[$name] = htmlentities(str_replace(array("\r", "\n"), '', strval($value)),ENT_COMPAT);
+ $this->options[$name] = htmlentities(str_replace(array("\r", "\n"), '', strval($value)),ENT_COMPAT,S_HTML_CHARSET);
}

function AddOption($name, $value)

Alexei
27-10-2007, 19:42
Thanks for reporting this. Registered as ZBX-118.