Changeset 324

Show
Ignore:
Timestamp:
02/21/2007 05:27:02 AM (6 years ago)
Author:
JavaWoman
Message:

Last bits of implementing workaround for #427:

  • modified implementation of htmlspecialchars_ent() (mainly because the $charset parameter is no longer needed, combined with cleaner and more maintainable code structure)
  • various additions of missing (or newly needed) @uses tags
  • minor clean up here and there

This leaves only GeSHi - if necessary this can be patched if we want to release before there is a new maintance release of GeSHi 1.0.7.x (which should use the same replacement function we do).

Location:
trunk
Files:
16 modified

Legend:

Unmodified
Added
Removed
  • trunk/actions/files.php

    r294 r324  
    2828 * @uses        Wakka::IsAdmin() 
    2929 * @uses        Wakka::MiniHref() 
     30 * @uses        Wakka::htmlspecialchars_ent() 
    3031 * 
    3132 * @todo security: check file type, not only extension 
  • trunk/actions/image.php

    r161 r324  
    1010 * @uses        Wakka::Link() 
    1111 * @uses        Wakka::ReturnSafeHTML() 
     12 * @uses        Wakka::htmlspecialchars_ent() 
    1213 * @input       string $url mandatory: URL of image to be embedded 
    1314 * @input       string $link optional: target link for image (optional). Supports URL, WikiName links, InterWiki links etc. 
  • trunk/actions/recentchanges.php

    r294 r324  
    1717 * @uses                Wakka::HasAccess() 
    1818 * @uses                Wakka::LoadUser() 
     19 * @uses                Wakka::htmlspecialchars_ent() 
    1920 *  
    2021 * @todo                make datetime format configurable; 
  • trunk/actions/textsearchexpanded.php

    r274 r324  
    8282                                        $matchString[0] = array_splice($matchString[0], SEARCH_MAX_SNIPPETS, count($matchString)); 
    8383                                } 
    84                                 $text = $this->htmlspecialchars_ent(implode('<br />', $matchString[0])); 
    85                                 $text = str_replace('&lt;br /&gt;', '&hellip;<br />&hellip;', $text); 
     84                                $text = $this->htmlspecialchars_ent(implode('<br />', $matchString[0]));        //TODO could be done in a single step 
     85                                $text = str_replace('&lt;br /&gt;', '&hellip;<br />&hellip;', $text);           //TODO could be done in a single step 
    8686                         # CSS-driven highlighting, tse stands for textsearchexpanded. We highlight $text in 2 steps,  
    8787                         #  We do not use <span>..</span> with preg_replace to ensure that the tag `span' won't be replaced if 
     
    107107                        break; 
    108108        } 
    109         printf(SEARCH_RESULTS.": <strong>".$match_str."</strong> for <strong>".$this->htmlspecialchars_ent($phrase)."</strong><br />\n", $total_results); #i18n 
     109        printf(SEARCH_RESULTS.": <strong>".$match_str."</strong> for <strong>".$this->htmlspecialchars_ent($phrase)."</strong><br />\n", $total_results); 
    110110        $result_page_list = $this->ReturnSafeHtml($result_page_list); 
    111111        echo '<ol>'.$result_page_list.'</ol>'."\n"; 
  • trunk/actions/usersettings.php

    r313 r324  
    1212 * @author              {@link http://wikkawiki.org/NilsLindenberg Nils Lindenberg} (possibility to restrict registration) 
    1313 * 
     14 * @uses                Wakka::htmlspecialchars_ent() 
     15 *  
    1416 * @todo                use different actions for registration / login / user settings; 
    1517 * @todo                add documentation links or short explanations for each option; 
     
    9799 
    98100                // validate form input 
    99                 switch(TRUE) 
     101                switch (TRUE) 
    100102                { 
    101103                        case (strlen($email) == 0): //email is empty 
     
    148150        <input type="hidden" name="action" value="update" /> 
    149151        <?php printf(USER_LOGGED_IN_AS_CAPTION, $this->Link($user['name'])); ?> 
    150         <input id="logout" type="button" value="<?php echo LOGOUT_BUTTON; ?>" onclick="document.location='<?php echo $this->href('', '', 'action=logout'); ?>'" /> 
     152        <input id="logout" type="button" value="<?php echo LOGOUT_BUTTON; ?>" onclick="document.location='<?php echo $this->Href('', '', 'action=logout'); ?>'" /> 
    151153        </fieldset> 
    152154         
  • trunk/formatters/code.php

    r161 r324  
    77 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    88 * @filesource 
     9 *  
     10 * @uses        Wakka::hsc_secure() 
    911 */ 
    10 print("<pre>".htmlspecialchars($text, ENT_QUOTES)."</pre>"); 
     12echo '<pre>'.$this->hsc_secure($text,ENT_QUOTES).'</pre>';      #427 
    1113?> 
  • trunk/formatters/email.php

    r161 r324  
    77 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    88 * @filesource 
     9 *  
     10 * @uses        Wakka::htmlspecialchars_ent() 
    911 */ 
    1012 
  • trunk/formatters/ini.php

    r161 r324  
    77 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
    88 * @filesource 
     9 *  
     10 * @uses        Wakka::hsc_secure() 
    911 */ 
    1012 
    11 $text = htmlspecialchars($text, ENT_QUOTES); 
     13$text = $this->hsc_secure($text,ENT_QUOTES);    #427 
    1214 
    1315$text = preg_replace("/([=,\|]+)/m","<span style=\"color:#4400DD\">\\1</span>",$text); 
     
    1618$text = preg_replace("/^(\[.*\])/m","<strong style=\"color:#AA0000;background:#EEE0CC\">\\1</strong>",$text); 
    1719print "<pre>".$text."</pre>"; 
    18  
    1920?> 
  • trunk/formatters/wakka.php

    r294 r324  
    1616 * @author {@link http://wikkawiki.org/DarTar Dario Taraborelli} (grab handler and filename support for codeblocks) 
    1717 * @author {@link http://wikkawiki.org/TormodHaugen Tormod Haugen} (table formatter support) 
     18 *  
     19 * @uses        Wakka::htmlspecialchars_ent() 
    1820 *  
    1921 * @todo                add support for formatter plugins; 
     
    488490                                } 
    489491                                // use GeSHi for highlighting 
    490                                 $output .= $wakka->GeSHi_Highlight($code, $language, $start); 
     492                                $output .= $wakka->GeSHi_Highlight($code, $language, $start); //TODO make GeSHi_Highlight() add a "\n" at the end (as well as the comments, maybe) 
    491493                        } 
    492494                        // check Wikka highlighter path is set and if we have an internal Wikka highlighter 
     
    671673                                // WARNING: JS vulnerability: two minus signs are not allowed in a comment, so we replace any occurence of them by underscore. 
    672674                                // Consider the code ||(p--><font size=1px><a href=...<!--:blabla 
    673                                 // When migrating to utf-8, we could use str_replace('--', '−−', $key) to make things more pretty. 
     675                                // When migrating to utf-8, we could use str_replace('--', '−−', $key) to make things more pretty. //TODO garbled ... mdash? 
    674676                                echo '<!--Cannot find attribute for key "'.str_replace('--', '__', $key).'" from hints given.-->'."\n"; 
    675677                        } 
  • trunk/handlers/page/edit.php

    r320 r324  
    2828 * @uses Wakka::Href() 
    2929 * @uses Wakka::htmlspecialchars_ent() 
     30 * @uses Wakka::hsc_secure() 
    3031 * @uses Wakka::LoadSingle() 
    3132 * @uses Wakka::Redirect() 
     
    140141        } 
    141142 
    142          //check if edit_notes are enabled 
     143        // create edit note field if edit_notes are enabled 
    143144        if ($this->config['require_edit_note'] != 2) 
    144145        { 
    145                 #$edit_note_field = '<input id="note" size="'.MAX_EDIT_NOTE_LENGTH.'" type="text" name="note" value="'.htmlspecialchars($note).'" '.$highlight_note.'/> <label for="note">'.EDIT_NOTE_LABEL.'</label><br />'."\n"; 
     146                // We need to escape ALL entity refs before display so we display them _as_ entities instead of interpreting them 
     147                // so we use hsc_secure() on the edit note (as on the body) 
    146148                $edit_note_field = '<input id="note" size="'.MAX_EDIT_NOTE_LENGTH.'" type="text" name="note" value="'.$this->hsc_secure($note).'" '.$highlight_note.'/> <label for="note">'.EDIT_NOTE_LABEL.'</label><br />'."\n";      #427 
    147149        } 
     
    164166        if (isset($_POST['submit']) && $_POST['submit'] == EDIT_PREVIEW_BUTTON) 
    165167        { 
    166                 // We need to escape ALL entity refs before display so we display them _as_ entities instead of interpreting them 
    167                 // so we use htmlspecialchars on the edit note (as on the body) 
    168168                $preview_buttons =      '<fieldset><legend>'.EDIT_STORE_PAGE_LEGEND.'</legend>'."\n". 
    169169                                                        $edit_note_field. 
     
    176176                $preview_form .= '<input type="hidden" name="previous" value="'.$previous.'" />'."\n". 
    177177                        // We need to escape ALL entity refs before display so we display them _as_ entities instead of interpreting them 
    178                         // hence htmlspecialchars() instead of htmlspecialchars_ent() which UNescapes entities! 
    179                         #'<input type="hidden" name="body" value="'.htmlspecialchars($body).'" />'."\n"; 
     178                        // hence hsc_secure() instead of htmlspecialchars_ent() which UNescapes entities! 
     179                        // JW/2007-02-20: why is this? wouldn't it be  easier for the person editing to show actual characters instead of entities?   
    180180                        '<input type="hidden" name="body" value="'.$this->hsc_secure($body).'" />'."\n";        #427 
    181181                $preview_form .= $preview_buttons."\n"; 
     
    232232                $output .= '<input type="hidden" name="previous" value="'.$previous.'" />'."\n". 
    233233                        // We need to escape ALL entity refs before display so we display them _as_ entities instead of interpreting them 
    234                         // hence htmlspecialchars() instead of htmlspecialchars_ent() which UNescapes entities! 
    235                         #'<textarea id="body" name="body">'.htmlspecialchars($body).'</textarea><br />'."\n"; 
     234                        // hence hsc_secure() instead of htmlspecialchars_ent() which UNescapes entities! 
     235                        // JW/2007-02-20: why is this? wouldn't it be  easier for the person editing to show actual characters instead of entities?   
    236236                        '<textarea id="body" name="body">'.$this->hsc_secure($body).'</textarea><br />'."\n";   #427 
    237                         //note add Edit 
    238                         // We need to escape ALL entity refs before display so we display them _as_ entities instead of interpreting them 
    239                         // so we use htmlspecialchars on the edit note (as on the body) 
    240                         // JW/2007-02-20: why is this? wouldn't it be  easier for the preson editing to show actual characters instead of entities?   
    241237                if ($buttons_position == 'bottom') 
    242238                { 
  • trunk/handlers/page/processcomment.php

    r295 r324  
    1616 * @uses        Wakka::SaveComment() 
    1717 * @uses        Wakka::UserIsOwner() 
     18 * @uses        Wakka::htmlspecialchars_ent() 
     19 *  
    1820 * @todo        move main <div> to templating class 
    1921 */ 
  • trunk/handlers/page/recentchanges.xml.mm.php

    r161 r324  
    4040                if (($c <= $max) || !$max) 
    4141                { 
    42                         $pageuser = $this->htmlspecialchars_ent($page["user"], '', '', 'XML'); #Just in case... 
    43                         $pagetag = $this->htmlspecialchars_ent($page["tag"], '', '', 'XML'); 
     42                        $pageuser = $this->htmlspecialchars_ent($page['user'],ENT_COMPAT,'XML'); #Just in case... 
     43                        $pagetag = $this->htmlspecialchars_ent($page['tag'],ENT_COMPAT,'XML'); 
    4444 
    4545                        // day header 
     
    5757                        $timeformatted = date("H:i T", strtotime($page["time"])); 
    5858                        $xml .= "<node LINK=\"$pagelink/revisions\" TEXT=\"Revision time: $timeformatted\"/>\n"; 
    59                         if ($pagenote = $this->htmlspecialchars_ent($page["note"], '', '', 'XML')) { 
     59                        if ($pagenote = $this->htmlspecialchars_ent($page['note'],ENT_COMPAT,'XML')) { 
    6060                                $xml .= "<node TEXT=\"$pageuser: $pagenote\"/>\n"; 
    6161                        } else { 
  • trunk/handlers/page/recentchanges.xml.php

    r323 r324  
    5050                        $xml .= "<title>".$this->htmlspecialchars_ent($page["tag"])."</title>\n"; 
    5151                        $xml .= "<link>".$this->Href("show", $page["tag"], "time=".urlencode($page["time"]))."</link>\n"; 
    52                         #$xml .= "\t<description>".sprintf(WIKKA_REV_WHEN_BY_WHO, $page['time'], $this->htmlspecialchars_ent($page["user"], '', '', 'XML')).($page['note'] ? ' - '.$this->htmlspecialchars_ent($page['note'], '', '', 'XML') : '')."</description>\n"; 
    5352                        $xml .= "\t<description>".sprintf(WIKKA_REV_WHEN_BY_WHO, $page['time'], $this->htmlspecialchars_ent($page["user"], '', '', 'XML')).($page['note'] ? ' - '.$this->htmlspecialchars_ent($page['note'],ENT_COMPAT,'XML') : '')."</description>\n"; 
    5453                        //$xml .= "\t<guid>".$page["id"]."</guid>"; 
  • trunk/handlers/page/referrers_sites.php

    r294 r324  
    1616 * @uses                Wakka::GetUser() 
    1717 * @uses                Wakka::Href() 
     18 * @uses                Wakka::htmlspecialchars_ent() 
    1819 *  
    1920 * @todo                move <div> to template 
     
    101102                foreach ($referrer_sites as $site => $site_count) 
    102103                { 
     104                        $site_esc = $this->htmlspecialchars_ent($site); 
    103105                        print("<tr>"); 
    104106                        print("<td width=\"30\" align=\"right\" valign=\"top\" style=\"padding-right: 10px\">$site_count</td>"); 
    105                         print("<td valign=\"top\">" . (($site != "unknown") ? "<a href=\"http://".$this->htmlspecialchars_ent($site)."\">".$this->htmlspecialchars_ent($site)."</a>" : $site) . "</a> ".($IsAdmin ? "[<a href=\"".$this->href("delete_referrer", "", "spam_site=").$this->htmlspecialchars_ent($site)."&amp;redirect=".$this->GetMethod().'">'.BLACKLIST_LINK_DESC."</a>]" : "")."</td>"); 
     107                        print("<td valign=\"top\">" . (($site != "unknown") ? "<a href=\"http://".$site_esc."\">".$site_esc."</a>" : $site) . "</a> ".($IsAdmin ? "[<a href=\"".$this->href("delete_referrer", "", "spam_site=").$site_esc."&amp;redirect=".$this->GetMethod().'">'.BLACKLIST_LINK_DESC."</a>]" : "")."</td>"); 
    106108                        print("</tr>\n"); 
    107109                } 
  • trunk/handlers/page/revisions.xml.php

    r323 r324  
    4646                        $xml .= "<title>".$page["time"]."</title>\n"; 
    4747                        $xml .= '<link>'.$this->Href('show', '', 'time='.urlencode($page['time'])).'</link>'."\n"; 
    48                         #$xml .= '<description>'.sprintf(REVISIONS_EDITED_BY, $this->htmlspecialchars_ent($page["user"])).($page['note'] ? ' - '.$this->htmlspecialchars_ent($page['note'], '', '', 'XML') : '')."</description>\n"; 
    4948                        $xml .= '<description>'.sprintf(REVISIONS_EDITED_BY, $this->htmlspecialchars_ent($page["user"])).($page['note'] ? ' - '.$this->htmlspecialchars_ent($page['note'],ENT_COMPAT,'XML') : '')."</description>\n"; 
    5049                        $xml .= "\t<pubDate>".date("r",strtotime($page["time"]))."</pubDate>\n";                
  • trunk/libs/Wakka.class.php

    r320 r324  
    399399 
    400400        /** 
    401 #        * Wrapper around PHP's htmlspecialchars() which preserves (repairs) entity references. 
    402401         * Wrapper around hsc_secure() which preserves entity references. 
    403402         * 
    404 #        * The function accepts the same parameters as htmlspecialchars() in PHP and passes them on 
    405 #        * to that function. 
    406          * The function accepts the same parameters as htmlspecialchars() in PHP and  
    407          * passes them on to our hsc_secure() replacement for that function. 
    408          * 
    409          * One default here is different here from that in htmlspecialchars() in PHP: 
    410          * charset is set to UTF-8 so we're ready for UTF-8 support (and as long as we don't support 
    411          * that there should be no difference with Latin-1); on systems where the charset parameter 
    412          * is not available or UTF-8 is not supported this will revert to Latin-1 (ISO-8859-1). 
    413          * ### updatee ^^ 
    414          * 
    415 #        * The function first applies htmlspecialchars() to the input string and then "unescapes" 
    416          * The function first applies hsc_secure() to the input string and then "unescapes" 
    417          * character entity references and numeric character references (both decimal and hexadecimal). 
    418          * Entities are recognized also if the ending semicolon is omitted at the end or before a 
    419          * newline or tag but for consistency the semicolon is always added in the output where it was 
    420          * omitted. 
    421          * 
    422          * NOTE: 
    423 #        * Where code should be rendered _as_code_ the original PHP function should be used so that 
    424          * Where code should be rendered _as_code_ hsc_secure() should be used directly so that 
    425          * entity references are also rendered as such instead of as their corresponding characters. 
    426          *  
    427          * NOTE2: 
     403         * The first two parameters for this function as the same as those for  
     404         * htmlspecialchars() in PHP: the text to be treated, and an optional 
     405         * parameter determining how to handle quotes; both these parameters are  
     406         * passed on to our hsc_secure() replacement for htmlspecialchars(). 
     407         *  
     408         * Since hsc_secure() does not need a character set parameter, we don't 
     409         * have that here any more either. 
     410         *  
     411         * A third 'doctype' parameter is for local use only and determines how  
     412         * pre-existing entity references are treated after hsc_secure() has done  
     413         * its work: numeic entity references are always "unescaped' since they are 
     414         * valid for both HTML and XML doctypes; for XML the named entity references 
     415         * for the special characters are unescaped as well, while for for HTML any 
     416         * named entity reference is unescaped. This parameter is optional and  
     417         * defaults to HTML.    
     418         * 
     419         * The function first applies hsc_secure() to the input string and then  
     420         * "unescapes" character entity references and numeric character references  
     421         * (both decimal and hexadecimal). 
     422         * Entities are recognized also if the ending semicolon is omitted at the  
     423         * end or before a newline or tag but for consistency the semicolon is  
     424         * always added in the output where it was omitted. 
     425         * 
     426         * Usage note: 
     427         * Where code should be rendered <em>as code</em> hsc_secure() should be  
     428         * used directly so that entity references are also rendered as such instead  
     429         * of as their corresponding characters. 
     430         *  
     431         * Documentation note: 
    428432         * It seems the $doctype parameter was added in 1.1.6.2; version should have  
    429433         * been bumped up to 1.1, and the param documented. We'll assume the updated 
     
    437441         * @uses        Wakka::hsc_secure() 
    438442         * @param       string  $text required: text to be converted 
    439          * @param       integer $quote_style optional: quoting style - can be ENT_COMPAT (default, escape 
    440          *                      only double quotes), ENT_QUOTES (escape both double and single quotes) or 
    441          *                      ENT_NOQUOTES (don't escape any quotes) 
    442          * @param       string  $charset optional: charset to use while converting; default UTF-8 
    443          *                      (overriding PHP's default ISO-8859-1) 
     443         * @param       integer $quote_style optional: quoting style - can be ENT_COMPAT  
     444         *                      (default, escape only double quotes), ENT_QUOTES (escape both  
     445         *                      double and single quotes) or ENT_NOQUOTES (don't escape any  
     446         *                      quotes) 
    444447         * @param       string $doctype 'HTML' (default) or 'XML'; for XML only the XML 
    445448         *                      standard entities are unescaped so we'll have valid XML content 
    446          * @return      string  converted string with escaped special characted but entity references intact 
    447          *  
    448          * @todo        rewrite to eliminate the $charset parameter which is suplerflous 
    449          *                      for our hsc_secure() replacement function. 
    450          * @todo        extend valid character entities for XML with 'apos' 
    451          * @todo        (later) support full range of situations where (in SGML) a terminating ; may legally 
    452          *                      be omitted (end, newline and tag are merely the most common ones). 
    453          * @todo        (maybe) recognize valid html entities and only leave those alone, thus transform &error; to &amp;error; 
    454          */ 
    455         function htmlspecialchars_ent($text,$quote_style=ENT_COMPAT,$charset='UTF-8',$doctype='HTML') 
    456         { 
     449         * @return      string  converted string with escaped special characted but  
     450         *                      entity references intact 
     451         *  
     452         * @todo        (maybe) recognize valid html entities and only leave those  
     453         *                      alone, thus transform &error; to &amp;error; 
     454         * @todo        later - maybe) support full range of situations where (in SGML)  
     455         *                      a terminating ; may legally be omitted (end, newline and tag are  
     456         *                      merely the most common ones); such usage is quite rare though  
     457         *                      and may not be worth the effort 
     458         */ 
     459        function htmlspecialchars_ent($text,$quote_style=ENT_COMPAT,$doctype='HTML') 
     460        { 
     461                // re-establish default if overwritten because of third parameter 
     462                // [ENT_COMPAT] => 2 
     463            // [ENT_QUOTES] => 3 
     464            // [ENT_NOQUOTES] => 0 
     465                if (!in_array($quote_style,array(ENT_COMPAT,ENT_QUOTES,ENT_NOQUOTES))) { 
     466                        $quote_style = ENT_COMPAT;       
     467                } 
     468                 
    457469                // define patterns 
    458                 $alpha  = '[a-z]+';                                                     # character entity reference todo: $alpha='eacute|egrave|ccirc|...' 
    459                 $ignore_case = 'i'; 
    460                 if ($doctype == 'XML') 
     470                $terminator = ';|(?=($|[\n<]|&lt;))';   // semicolon; or end-of-string, newline or tag 
     471                $numdec = '#[0-9]+';                                    // numeric character reference (decimal) 
     472                $numhex = '#x[0-9a-f]+';                                // numeric character reference (hexadecimal) 
     473                if ($doctype == 'XML')                                  // pure XML allows only named entities for special chars 
    461474                { 
    462475                        // only valid named entities in XML (case-sensitive) 
    463                         $alpha = 'lt|gt|quot|apos|amp';                  
     476                        $named = 'lt|gt|quot|apos|amp';                  
    464477                        $ignore_case = ''; 
    465                         // enforce defaults if defaults were "undefaulted" 
    466                         if ($quote_style === '') $quote_style = ENT_COMPAT; 
    467                         if ($charset === '') $charset = 'UTF-8'; 
    468                 } 
    469                 $numdec = '#[0-9]+';                                            # numeric character reference (decimal) 
    470                 $numhex = '#x[0-9a-f]+';                                        # numeric character reference (hexadecimal) 
    471                 $terminator = ';|(?=($|[\n<]|&lt;))';           # semicolon; or end-of-string, newline or tag 
    472                 $entitystring = $alpha.'|'.$numdec.'|'.$numhex; 
     478                        $entitystring = $named.'|'.$numdec.'|'.$numhex; 
     479                } 
     480                else                                                                    // (X)HTML 
     481                { 
     482                        $alpha  = '[a-z]+';                                     // character entity reference TODO $named='eacute|egrave|ccirc|...' 
     483                        $ignore_case = 'i';                                     // names can consist of upper and lower case letters 
     484                        $entitystring = $alpha.'|'.$numdec.'|'.$numhex; 
     485                } 
    473486                $escaped_entity = '&amp;('.$entitystring.')('.$terminator.')'; 
    474487 
    475                 #// execute PHP built-in function, passing on optional parameters 
    476                 #$output = htmlspecialchars($text,$quote_style,$charset); 
    477488                // execute our replacement hsc_secure() function, passing on optional parameters 
    478                 $output = $this->hsc_secure($text,$quote_style,$charset); 
     489                $output = $this->hsc_secure($text,$quote_style); 
     490 
    479491                // "repair" escaped entities 
    480492                // modifiers: s = across lines, i = case-insensitive 
    481493                $output = preg_replace('/'.$escaped_entity.'/s'.$ignore_case,"&$1;",$output); 
     494 
    482495                // return output 
    483496                return $output; 
     
    12801293                        } 
    12811294                        if ($ping["history"]) $rpcRequest .= "<member>\n<name>history</name>\n<value>".$ping["history"]."</value>\n</member>\n"; 
    1282                         if ($ping["changelog"]) $rpcRequest .= "<member>\n<name>changelog</name>\n<value>".$this->htmlspecialchars_ent($ping["changelog"], '', '', 'XML')."</value>\n</member>\n"; 
     1295                        #if ($ping["changelog"]) $rpcRequest .= "<member>\n<name>changelog</name>\n<value>".$this->htmlspecialchars_ent($ping["changelog"], '', '', 'XML')."</value>\n</member>\n"; 
     1296                        if ($ping["changelog"]) $rpcRequest .= "<member>\n<name>changelog</name>\n<value>".$this->htmlspecialchars_ent($ping["changelog"],ENT_COMPAT,'XML')."</value>\n</member>\n"; 
    12831297                        $rpcRequest .= "</struct>\n</value>\n</param>\n"; 
    12841298                        $rpcRequest .= "</params>\n";