Ad Widget

Collapse

show_popup_menu display problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nonaka_nona_to
    Junior Member
    • Sep 2007
    • 9

    #1

    show_popup_menu display problem

    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.

    Code:
    # 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)
    Attached Files
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Thanks for reporting this. Registered as ZBX-118.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    Working...