title: Calling HTMLPurifier->getHTMLDefinition() is changing HTMLPurifier's behaviour
body: <p>I'm using HTMLPurifier to sanitize some HTML I'm getting from a form. However when I call <code>getHTMLDefinition()</code> on my config it causes <code>HTMLPurifier-&gt;purify()</code> to throw a warning. </p>
  
  <p>Here's my setup:</p>
  
  <pre><code>$HPConfig = HTMLPurifier_Config::createDefault();
  $HPConfig-&gt;set('Cache.SerializerPath', APPLICATION_ROOT.'/forums/cache/HtmlPurifier');
  $HPConfig-&gt;set('HTML.Doctype', 'XHTML 1.0 Transitional');
  $HPConfig-&gt;set('HTML.AllowedElements', ['p','br','img','i','b']);
  $HPConfig-&gt;set('HTML.AllowedAttributes', ['href','style']);
  $HPConfig-&gt;set('CSS.AllowedProperties', 'text-align');
  
  $HPConfig-&gt;set('HTML.DefinitionID', 'myapp-text.html');
  $HPConfig-&gt;set('HTML.DefinitionRev', 2);
  $def = $HPConfig-&gt;getHTMLDefinition(true);
  
  $HtmlPurifier = new HTMLPurifier($HPConfig); 
  $text = $HtmlPurifier-&gt;purify($text);
  </code></pre>
  
  <p>When I use the above code my script throws this warning:</p>
  
  <pre><code>Warning: Global attribute 'href' is not supported in any elements (for information on implementing this, see the support forums)  in /var/...
  </code></pre>
  
  <p>However, if I simply remove the <code>$def = $HPConfig-&gt;getHTMLDefinition(true);</code> line the warning disappears. What does the <code>getHTMLDefinition()</code> method do that causes HTMLPurifier's behaviour to change? and is there a way to prevent it from happening?</p>