Compiler.php
protected function compileScalar($value, $inCode = false)
    {

        $sequences = $this->options['escape_sequences'];

        foreach ($sequences as $seq => $repl) {
            $value = preg_replace('/(?<!\\\\)'.preg_quote($seq, '/').'/', $repl, $value);
        }


        return $this->interpolate(trim($value, '\'"'), $inCode);
    }
protected function compileScalar($value, $inCode = false)
    {

        $sequences = $this->options['escape_sequences'];

        foreach ($sequences as $seq => $repl) {
            $value = preg_replace('/(?<!\\\\)'.preg_quote($seq, '/').'/', $repl, $value);
        }


        return $this->interpolate(trim($value, '\'"'), $inCode);
    }
protected function compileScalar ( $ value , $ inCode = false ) { $ sequences = $ this -> options [ 'escape_sequences' ] ; foreach ( $ sequences as $ seq => $ repl ) { $ value = preg_replace ( '/(?<!\\\\)' . preg_quote ( $ seq , '/' ) . '/' , $ repl , $ value ) ; } return $ this -> interpolate ( trim ( $ value , '\'"' ) , $ inCode ) ; }
Compiles and sanitizes a scalar value.

@param string     $value  the scalar value
@param bool|false $inCode is this an attribute value or not

@return string
Compiles and sanitizes a scalar value .