title: How Can I Make WordPress's <?php the_title_attribute(); ?> Render %20 for Spaces?
body: <p>I'm trying to render a WordPress theme that is 100% HTML5 compliant, and have managed my way through all but one snag.</p>
  
  <p>At the end of certain posts I show a "Tweet" link, which uses the following source code in the Theme template:</p>
  
  <pre><code>&lt;a href="http://twitter.com/share?text=&lt;?php the_title_attribute(); ?&gt;&amp;amp;via=ianhines&amp;amp;url=&lt;?php echo simple_url_shortener('','service=bit.ly+key&amp;apikey=R_a6dc414291bb882024ddd99690f5eb61&amp;login=ianhines&amp;cache=no'); ?&gt;" title="Share This Article on Twitter"&gt;Tweet&lt;/a&gt;
  </code></pre>
  
  <p>HTML5 forbids having spaces in URLs. They must be rendered as <code>%20</code>. However, <code>&lt;?php the_title_attribute; ?&gt;</code> renders an XHTML safe version of the Post Title with spaces maintained.  </p>
  
  <p>An example URL (rendered using the template source code above):</p>
  
  <pre><code>a href="http://twitter.com/share?text=Twitter, Reblog, and Email Comments&amp;via=ianhines&amp;url=http://ihin.es/eCoYN9" title="Share This Article on Twitter"&gt;Tweet&lt;/a&gt;
  </code></pre>
  
  <p>Is there any way I can force WordPress to render the spaces in this URL string as %20, and thereby make my site fully HTML5 compliant?</p>