lib/PHPRtfLite.php
public static function quoteRtfCode($text, $convertNewlines = true)
    {
        // escape backslashes and curly brackets
        $text = str_replace(array('\\', '{', '}'), array('\\\\', '\\{', '\\}'), $text);
        if ($convertNewlines) {
            $text = self::convertNewlinesToRtfCode($text);
        }

        return $text;
    }
public static function quoteRtfCode($text, $convertNewlines = true)
    {
        // escape backslashes and curly brackets
        $text = str_replace(array('\\', '{', '}'), array('\\\\', '\\{', '\\}'), $text);
        if ($convertNewlines) {
            $text = self::convertNewlinesToRtfCode($text);
        }

        return $text;
    }
public static function quoteRtfCode ( $ text , $ convertNewlines = true ) { // escape backslashes and curly brackets $ text = str_replace ( array ( '\\' , '{' , '}' ) , array ( '\\\\' , '\\{' , '\\}' ) , $ text ) ; if ( $ convertNewlines ) { $ text = self :: convertNewlinesToRtfCode ( $ text ) ; } return $ text ; }
quotes rtf code

@param  string   $text
@param  boolean  $convertNewlines
@return string
quotes rtf code