lib/Tokenizer.php
protected function _findEndOfQuotedString($quote, $start) {
        $nextEscape = strpos($this->_css, '\\', $start + 1);
        $end = strpos($this->_css, $quote, $start + 1);

        if ($end === false) {
            // Invalid string
            return false;
        }

        while ($nextEscape !== false && $nextEscape < $end) {
            if ($end === $nextEscape + 1) {
                $end = strpos($this->_css, $quote, $end + 1);
                if ($end === false) {
                    // Invalid string
                    return false;
                }
            }
            $nextEscape = strpos($this->_css, '\\', $nextEscape + 2);
        }

        return $end + 1;
    }
protected function _findEndOfQuotedString($quote, $start) {
        $nextEscape = strpos($this->_css, '\\', $start + 1);
        $end = strpos($this->_css, $quote, $start + 1);

        if ($end === false) {
            // Invalid string
            return false;
        }

        while ($nextEscape !== false && $nextEscape < $end) {
            if ($end === $nextEscape + 1) {
                $end = strpos($this->_css, $quote, $end + 1);
                if ($end === false) {
                    // Invalid string
                    return false;
                }
            }
            $nextEscape = strpos($this->_css, '\\', $nextEscape + 2);
        }

        return $end + 1;
    }
Find end of quoted string

@param string $quote Quote character
@param int $start Position of first quote
@return int|bool Position of character after end of string, false if string is broken