Aleksander Machniak
2015-08-25 f00e1f53339660fd57944f4cefdc18cf53c544b0
CS fixes
1 files modified
11 ■■■■ changed files
program/lib/Roundcube/rcube_utils.php 11 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_utils.php
@@ -155,6 +155,7 @@
    {
        $uri = parse_url($_SERVER['REQUEST_URI']);
        $referer = parse_url(self::request_header('Referer'));
        return $referer['host'] == self::request_header('Host') && $referer['path'] == $uri['path'];
    }
@@ -163,7 +164,7 @@
     *
     * @param  string  Input string
     * @param  string  Encoding type: text|html|xml|js|url
     * @param  string  Replace mode for tags: show|replace|remove
     * @param  string  Replace mode for tags: show|remove|strict
     * @param  boolean Convert newlines
     *
     * @return string  The quoted string
@@ -187,8 +188,11 @@
            $encode_arr = $html_encode_arr;
            if ($mode == 'remove') {
                $str = strip_tags($str);
            }
            else if ($mode != 'strict') {
            // don't replace quotes and html tags
            if ($mode == 'show' || $mode == '') {
                $ltpos = strpos($str, '<');
                if ($ltpos !== false && strpos($str, '>', $ltpos) !== false) {
                    unset($encode_arr['"']);
@@ -196,9 +200,6 @@
                    unset($encode_arr['>']);
                    unset($encode_arr['&']);
                }
            }
            else if ($mode == 'remove') {
                $str = strip_tags($str);
            }
            $out = strtr($str, $encode_arr);