title: jQuery escape white spaces
body: <p>Inside the selectmenu from <a href="https://github.com/fnagel/jquery-ui" rel="nofollow">https://github.com/fnagel/jquery-ui</a> I have set a title for each option do be displayed as an icon. Working fine except the icons which filename contains white space. No icon is shown if the file name is like <code>African Union.png</code></p>
  
  <p>the jquery:</p>
  
  <pre><code>        $('select.flags').selectmenu({
              icons: [
                  {find: '.icon'}
              ],
              bgImage: function() {
                  return 'url(' + $(this).attr("title") + ')';
              }
          });
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>&lt;option value="African Union.png" class="icon" title="/img/icons/flags/African Union.png" &gt;African Union&lt;/option&gt;
  </code></pre>
  
  <p>If I am not able to get it working inside the jQuery - How to escape the white spaces using php? Is the <code>str_replace</code> the only option?</p>