Index: branches/5.2.x/core/install/install_toolkit.php =================================================================== diff -u -r15421 -r15601 --- branches/5.2.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 15421) +++ branches/5.2.x/core/install/install_toolkit.php (.../install_toolkit.php) (revision 15601) @@ -1,6 +1,6 @@ Conn->Query($sql); if ($this->Conn->getErrorCode() != 0) { if (is_object($this->_installator)) { - $this->_installator->errorMessage = 'Error: ('.$this->Conn->getErrorCode().') '.$this->Conn->getErrorMsg().'

Last Database Query:
'; + $this->_installator->errorMessage = 'Error: ('.$this->Conn->getErrorCode().') '.$this->Conn->getErrorMsg().'

Last Database Query:
'; $this->_installator->LastQueryNum = $i + 1; } return false; @@ -728,7 +728,7 @@ $image_src = $this->Application->BaseURL() . $image_src; } - $ret[] = '' . htmlspecialchars($module_name) . ''; + $ret[] = '' . htmlspecialchars($module_name, null, 'UTF-8') . ''; } if (array_key_exists('description', $module_info) && $module_info['description']) { Index: branches/5.2.x/core/kernel/utility/http_query.php =================================================================== diff -u -r15569 -r15601 --- branches/5.2.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 15569) +++ branches/5.2.x/core/kernel/utility/http_query.php (.../http_query.php) (revision 15601) @@ -1,6 +1,6 @@ Application->isAdmin) { - $value = htmlspecialchars($value); + $value = htmlspecialchars($value, null, CHARSET); } $array[$key] = $value; Index: branches/5.2.x/core/kernel/processors/main_processor.php =================================================================== diff -u -r15588 -r15601 --- branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15588) +++ branches/5.2.x/core/kernel/processors/main_processor.php (.../main_processor.php) (revision 15601) @@ -1,6 +1,6 @@ _exportEncoding . '"'; foreach ($export_fields as $export_field) { - $ret .= ' ' . $export_field . '="' . htmlspecialchars($language_info[$export_field], NULL, 'UTF-8') . '"'; + $ret .= ' ' . $export_field . '="' . htmlspecialchars($language_info[$export_field], NULL, CHARSET) . '"'; } $ret .= '>' . "\n"; @@ -363,8 +363,8 @@ $column_translation = base64_encode($column_translation); } else { - $hint_translation = htmlspecialchars($hint_translation, NULL, 'UTF-8'); - $column_translation = htmlspecialchars($column_translation, NULL, 'UTF-8'); + $hint_translation = htmlspecialchars($hint_translation, NULL, CHARSET); + $column_translation = htmlspecialchars($column_translation, NULL, CHARSET); } $attributes = Array ( Index: branches/5.2.x/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r15368 -r15601 --- branches/5.2.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 15368) +++ branches/5.2.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 15601) @@ -1,6 +1,6 @@ ImageSize($block_params); $block_params['img_size'] = $image_dimensions ? $image_dimensions : ' width="' . $block_params['DefaultWidth'] . '"'; - $block_params['alt'] = $object->GetField('AltName') ? $object->GetField('AltName') : htmlspecialchars($this->getItemTitle($parent_item)); + $block_params['alt'] = $object->GetField('AltName') ? $object->GetField('AltName') : htmlspecialchars($this->getItemTitle($parent_item), null, CHARSET); $block_params['align'] = array_key_exists('align', $block_params) ? $block_params['align'] : 'left'; } @@ -447,7 +447,7 @@ $params['img_path'] = $image_url; $image_dimensions = $this->ImageSize($params); $params['img_size'] = $image_dimensions ? $image_dimensions : ' width="' . $params['DefaultWidth'] . '"'; - $params['alt'] = htmlspecialchars($object->GetField('AltName')); // really used ? + $params['alt'] = htmlspecialchars($object->GetField('AltName'), null, CHARSET); // really used ? $params['name'] = $this->SelectParam($params, 'block,render_as'); $params['align'] = array_key_exists('align', $params) ? $params['align'] : 'left'; $params['no_editing'] = 1; Index: branches/5.2.x/core/kernel/processors/tag_processor.php =================================================================== diff -u -r15137 -r15601 --- branches/5.2.x/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 15137) +++ branches/5.2.x/core/kernel/processors/tag_processor.php (.../tag_processor.php) (revision 15601) @@ -1,6 +1,6 @@ "; if (!isset($this->Prefixes[$prefix])) - $this->Application->ApplicationDie ("Filepath and ClassName for prefix $prefix not defined while processing ".htmlspecialchars($tag->GetFullTag())."!"); + $this->Application->ApplicationDie ("Filepath and ClassName for prefix $prefix not defined while processing ".htmlspecialchars($tag->GetFullTag(), null, CHARSET)."!"); include_once($this->Prefixes[$prefix]['path']); $ClassName = $this->Prefixes[$prefix]['class']; $a_processor = new $ClassName($prefix); Index: branches/5.2.x/core/units/fck/fck_eh.php =================================================================== diff -u -r15445 -r15601 --- branches/5.2.x/core/units/fck/fck_eh.php (.../fck_eh.php) (revision 15445) +++ branches/5.2.x/core/units/fck/fck_eh.php (.../fck_eh.php) (revision 15601) @@ -1,6 +1,6 @@ Application->HREF($template, '_FRONT_END_', array('pass' => 'm'), 'index.php'); - $res .= '' . "\n"; + $res .= '' . "\n"; } $res.= ""; Index: branches/5.2.x/core/units/email_events/email_events_event_handler.php =================================================================== diff -u -r15542 -r15601 --- branches/5.2.x/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 15542) +++ branches/5.2.x/core/units/email_events/email_events_event_handler.php (.../email_events_event_handler.php) (revision 15601) @@ -1,6 +1,6 @@ '; foreach ($data as $item) { - echo '' . htmlspecialchars($item) . ''; + echo '' . htmlspecialchars($item, null, CHARSET) . ''; } echo ''; Index: branches/5.2.x/core/kernel/utility/debugger.php =================================================================== diff -u -r15597 -r15601 --- branches/5.2.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 15597) +++ branches/5.2.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 15601) @@ -1,6 +1,6 @@ no value'; } else { - $value = htmlspecialchars($this->print_r($value, true)); + $value = htmlspecialchars($this->print_r($value, true), null, 'UTF-8'); } echo '' . $prefix . '' . $key . '' . $value . ''; Index: branches/5.2.x/core/kernel/nparser/nparser.php =================================================================== diff -u -r15413 -r15601 --- branches/5.2.x/core/kernel/nparser/nparser.php (.../nparser.php) (revision 15413) +++ branches/5.2.x/core/kernel/nparser/nparser.php (.../nparser.php) (revision 15601) @@ -1,6 +1,6 @@ +
%s Index: branches/5.2.x/core/install.php =================================================================== diff -u -r15597 -r15601 --- branches/5.2.x/core/install.php (.../install.php) (revision 15597) +++ branches/5.2.x/core/install.php (.../install.php) (revision 15601) @@ -1,6 +1,6 @@ errorMessage = 'Query:
'.htmlspecialchars($sql).'
execution result is error:
['.$code.'] '.$msg; + $this->errorMessage = 'Query:
'.htmlspecialchars($sql, null, 'UTF-8').'
execution result is error:
['.$code.'] '.$msg; return true; } Index: branches/5.2.x/core/units/logs/change_logs/changes_formatter.php =================================================================== diff -u -r15515 -r15601 --- branches/5.2.x/core/units/logs/change_logs/changes_formatter.php (.../changes_formatter.php) (revision 15515) +++ branches/5.2.x/core/units/logs/change_logs/changes_formatter.php (.../changes_formatter.php) (revision 15601) @@ -1,6 +1,6 @@ Application->Phrase($title, false, true); - return $tabs . 'a_toolbar.AddButton( new ToolBarButton("' . $name . '", "' . htmlspecialchars($phrase) . '") );'; + return $tabs . 'a_toolbar.AddButton( new ToolBarButton("' . $name . '", "' . htmlspecialchars($phrase, null, CHARSET) . '") );'; } function _getThemeFileId() Index: branches/5.2.x/core/units/helpers/deployment_helper.php =================================================================== diff -u -r15588 -r15601 --- branches/5.2.x/core/units/helpers/deployment_helper.php (.../deployment_helper.php) (revision 15588) +++ branches/5.2.x/core/units/helpers/deployment_helper.php (.../deployment_helper.php) (revision 15601) @@ -1,6 +1,6 @@ toLog($sql . ' ... ', false); - echo mb_substr(trim(preg_replace('/(\n|\t| )+/is', ' ', ($this->isCommandLine ? $sql : htmlspecialchars($sql)))), 0, self::SQL_TRIM_LENGTH) . ' ... '; + echo mb_substr(trim(preg_replace('/(\n|\t| )+/is', ' ', ($this->isCommandLine ? $sql : htmlspecialchars($sql, null, CHARSET)))), 0, self::SQL_TRIM_LENGTH) . ' ... '; $this->Conn->Query($sql); @@ -563,7 +563,7 @@ $html_color = $html_color_map[$color][$bold ? 'bold' : 'normal']; - return '' . htmlspecialchars($text) . ''; + return '' . htmlspecialchars($text, null, CHARSET) . ''; } /** @@ -579,7 +579,7 @@ return "\033[1m" . $text . "\033[0m"; } - return '' . htmlspecialchars($text) . ''; + return '' . htmlspecialchars($text, null, CHARSET) . ''; } /** @@ -611,7 +611,7 @@ private function out($text, $new_line = false) { if ( !$this->isCommandLine ) { - $text = htmlspecialchars($text); + $text = htmlspecialchars($text, null, CHARSET); } echo $text . ($new_line ? PHP_EOL : ''); Index: branches/5.2.x/core/units/helpers/xml_helper.php =================================================================== diff -u -r14699 -r15601 --- branches/5.2.x/core/units/helpers/xml_helper.php (.../xml_helper.php) (revision 14699) +++ branches/5.2.x/core/units/helpers/xml_helper.php (.../xml_helper.php) (revision 15601) @@ -1,6 +1,6 @@ OriginalAttributes as $name => $value) { - $att_contents[] = $name.'="'.htmlspecialchars($value).'"'; + $att_contents[] = $name.'="'.htmlspecialchars($value, null, CHARSET).'"'; } $xml .= implode(' ', $att_contents); } Index: branches/5.2.x/core/units/helpers/controls/minput_helper.php =================================================================== diff -u -r15232 -r15601 --- branches/5.2.x/core/units/helpers/controls/minput_helper.php (.../minput_helper.php) (revision 15232) +++ branches/5.2.x/core/units/helpers/controls/minput_helper.php (.../minput_helper.php) (revision 15601) @@ -1,6 +1,6 @@ ' . htmlspecialchars($field_value) . ''; + $xml .= '' . htmlspecialchars($field_value, null, CHARSET) . ''; } $xml .= ''; } Index: branches/5.2.x/core/kernel/db/db_event_handler.php =================================================================== diff -u -r15575 -r15601 --- branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 15575) +++ branches/5.2.x/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 15601) @@ -1,6 +1,6 @@ '; foreach ($data as $item) { - echo '' . htmlspecialchars($item) . ''; + echo '' . htmlspecialchars($item, null, CHARSET) . ''; } echo ''; Index: branches/5.2.x/core/units/configuration/configuration_event_handler.php =================================================================== diff -u -r15590 -r15601 --- branches/5.2.x/core/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 15590) +++ branches/5.2.x/core/units/configuration/configuration_event_handler.php (.../configuration_event_handler.php) (revision 15601) @@ -1,6 +1,6 @@ ' . $of_label . ' ' . $suggestion_module . ''; - echo '' . htmlspecialchars($suggestion_title) . ''; + echo '' . htmlspecialchars($suggestion_title, null, CHARSET) . ''; } echo '';