roundcubemail/plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
static function escape_multiline_string($str)
    {
        $str = preg_split('/(\r?\n)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE);

        foreach ($str as $idx => $line) {
            // dot-stuffing
            if (isset($line[0]) && $line[0] == '.') {
                $str[$idx] = '.' . $line;
            }
        }

        return implode($str);
    }
static function escape_multiline_string($str)
    {
        $str = preg_split('/(\r?\n)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE);

        foreach ($str as $idx => $line) {
            // dot-stuffing
            if (isset($line[0]) && $line[0] == '.') {
                $str[$idx] = '.' . $line;
            }
        }

        return implode($str);
    }
static function escape_multiline_string ( $ str ) { $ str = preg_split ( '/(\r?\n)/' , $ str , - 1 , PREG_SPLIT_DELIM_CAPTURE ) ; foreach ( $ str as $ idx => $ line ) { // dot-stuffing if ( isset ( $ line [ 0 ] ) && $ line [ 0 ] == '.' ) { $ str [ $ idx ] = '.' . $ line ; } } return implode ( $ str ) ; }
Escape special chars in multi-line string value

@param string $str Text

@return string Text
Escape special chars in multi - line string value