Index: branches/5.2.x/core/units/helpers/deployment_helper.php =================================================================== diff -u -N -r15728 -r15856 --- branches/5.2.x/core/units/helpers/deployment_helper.php (.../deployment_helper.php) (revision 15728) +++ branches/5.2.x/core/units/helpers/deployment_helper.php (.../deployment_helper.php) (revision 15856) @@ -1,6 +1,6 @@ isCommandLine ) { - echo htmlspecialchars($this->_runShellScript()); + echo kUtil::escape($this->_runShellScript()); echo '' . PHP_EOL; } @@ -499,7 +499,8 @@ } elseif ( $sql ) { $this->toLog($sql . ' ... ', false); - echo mb_substr(trim(preg_replace('/(\n|\t| )+/is', ' ', ($this->isCommandLine ? $sql : htmlspecialchars($sql, null, CHARSET)))), 0, self::SQL_TRIM_LENGTH) . ' ... '; + $escaped_sql = $this->isCommandLine ? $sql : kUtil::escape($sql); + echo mb_substr(trim(preg_replace('/(\n|\t| )+/is', ' ', $escaped_sql)), 0, self::SQL_TRIM_LENGTH) . ' ... '; $this->Conn->Query($sql); @@ -640,26 +641,10 @@ $html_color = $html_color_map[$color][$bold ? 'bold' : 'normal']; - return '' . htmlspecialchars($text, null, CHARSET) . ''; + return '' . kUtil::escape($text, kUtil::ESCAPE_HTML) . ''; } /** - * Makes given text bold - * - * @param string $text - * @return string - * @access private - */ - private function boldText($text) - { - if ( $this->isCommandLine ) { - return "\033[1m" . $text . "\033[0m"; - } - - return '' . htmlspecialchars($text, null, CHARSET) . ''; - } - - /** * Displays last command execution status * * @param string $status_text @@ -688,7 +673,7 @@ private function out($text, $new_line = false) { if ( !$this->isCommandLine ) { - $text = htmlspecialchars($text, null, CHARSET); + $text = kUtil::escape($text); } echo $text . ($new_line ? PHP_EOL : '');