protected function parseQuotedAttributeValue()
	{
		$quote    = $this->text[$this->pos];
		$valuePos = $this->pos + 1;
		while (1)
		{
			// Look for the next quote
			$this->pos = strpos($this->text, $quote, $this->pos + 1);
			if ($this->pos === false)
			{
				// No matching quote. Apparently that string never ends...
				throw new RuntimeException;
			}

			// Test for an odd number of backslashes before this character
			$n = 0;
			do
			{
				++$n;
			}
			while ($this->text[$this->pos - $n] === '\\');

			if ($n % 2)
			{
				// If $n is odd, it means there's an even number of backslashes. We can exit this
				// loop
				break;
			}
		}

		// Unescape special characters ' " and \
		$attrValue = preg_replace(
			'#\\\\([\\\\\'"])#',
			'$1',
			substr($this->text, $valuePos, $this->pos - $valuePos)
		);

		// Skip past the closing quote
		++$this->pos;

		return $attrValue;
	}
protected function parseQuotedAttributeValue()
	{
		$quote    = $this->text[$this->pos];
		$valuePos = $this->pos + 1;
		while (1)
		{
			// Look for the next quote
			$this->pos = strpos($this->text, $quote, $this->pos + 1);
			if ($this->pos === false)
			{
				// No matching quote. Apparently that string never ends...
				throw new RuntimeException;
			}

			// Test for an odd number of backslashes before this character
			$n = 0;
			do
			{
				++$n;
			}
			while ($this->text[$this->pos - $n] === '\\');

			if ($n % 2)
			{
				// If $n is odd, it means there's an even number of backslashes. We can exit this
				// loop
				break;
			}
		}

		// Unescape special characters ' " and \
		$attrValue = preg_replace(
			'#\\\\([\\\\\'"])#',
			'$1',
			substr($this->text, $valuePos, $this->pos - $valuePos)
		);

		// Skip past the closing quote
		++$this->pos;

		return $attrValue;
	}
protected function parseQuotedAttributeValue ( ) { $ quote = $ this -> text [ $ this -> pos ] ; $ valuePos = $ this -> pos + 1 ; while ( 1 ) { // Look for the next quote $ this -> pos = strpos ( $ this -> text , $ quote , $ this -> pos + 1 ) ; if ( $ this -> pos === false ) { // No matching quote. Apparently that string never ends... throw new RuntimeException ; } // Test for an odd number of backslashes before this character $ n = 0 ; do { ++ $ n ; } while ( $ this -> text [ $ this -> pos - $ n ] === '\\' ) ; if ( $ n % 2 ) { // If $n is odd, it means there's an even number of backslashes. We can exit this // loop break ; } } // Unescape special characters ' " and \ $ attrValue = preg_replace ( '#\\\\([\\\\\'"])#' , '$1' , substr ( $ this -> text , $ valuePos , $ this -> pos - $ valuePos ) ) ; // Skip past the closing quote ++ $ this -> pos ; return $ attrValue ; }
Parse a quoted attribute value that starts at current offset

@return string
Parse a quoted attribute value that starts at current offset