title: Issue with using DOMNode->attributes with attributes that have multiple words in the value
body: <p>Been scratching my head at this one for way too long now...</p>
  
  <pre><code>$dom = new DOMDocument();
  $dom-&gt;loadHTML( $content );
  
  $links = $dom-&gt;getElementsByTagName( 'a' )-&gt;item( 0 );
  foreach ( $links-&gt;attributes as $attribute ) {
      $name = $attribute-&gt;nodeName;
      $value = str_replace( '"', '', stripslashes( $attribute-&gt;nodeValue ) );
      echo "$name: $value&lt;br /&gt;";
  }
  </code></pre>
  
  <p>There is my code which I eventually got from: <a href="https://stackoverflow.com/questions/2385834/php-dom-get-all-attributes-of-a-node">php dom get all attributes of a node</a>. I've also tried other methods such as calling getAttribute() for a single attribute to see if that would work, but got the same result.</p>
  
  <p>The HTML I am attempting to go through is simply:</p>
  
  <pre><code>&lt;a id="testid" title="testtitle" name="this is a testname" href="http://example.com/"&gt;link!&lt;/a&gt;
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <pre><code>Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: error parsing attribute name in Entity, line: 1
  </code></pre>
  
  <p>My script is outputting:</p>
  
  <pre><code>id: testid
  title: testtitle
  name: this
  is: 
  a: 
  testname: 
  href: http://example.com/
  </code></pre>
  
  <p>I should add that the output works fine if the 'name' attribute is one word.</p>
  
  <p>So obviously, it must be using explode() or something stupid on spaces. Is there a way to get around this without converting all spaces to %20 or something (I have plenty of other content beyond the links and wouldn't want to convert a whole block of content)?</p>