protected function acceptSafeValue( $until = '};' )
    {
        $result  = '';

        while ( ! empty( $this->buffer ) &&
                false === strpos( $until, $first = $this->buffer[0] ) )
        {
            $matches = array();

            if ( '"' == $first )
            {
                $result        .= '"';
                $this->buffer  = substr( $this->buffer, 1 );

                if ( $this->buffer && '"' == $this->buffer[0] )
                {
                    $result        .= '"';
                    $this->buffer   = substr( $this->buffer, 1 );
                }
                else if ( preg_match( '/^.*?[^\\\\]"/', $this->buffer, $matches ) )
                {
                    $result        .= $matches[0];
                    $this->buffer   = substr( $this->buffer, strlen( $matches[0] ) );
                }
                else
                {
                    $result        .= $this->buffer;
                    $this->buffer   = '';
                    break;
                }
            }
            else
            {
                if ( preg_match( '/^[^' . preg_quote( $until ) .
                        '"]+/', $this->buffer, $matches ) )
                {
                    $result        .= preg_replace( '/\s+/', ' ', $matches[0] );
                    $this->buffer   = substr( $this->buffer, strlen( $matches[0] ) );
                }
                else
                {
                    break;
                }
            }
        }

        return $result;
    }