title: Unrecognized expression when appending data attribute
body: <p>I try to create a HTML element with a class and data attribute via jQuery:</p>
  
  <pre><code>elem.append($('&lt;ul&gt;', {'class': 'list-group-item', 'data-topic': value}));
  </code></pre>
  
  <p>This works fine, except when the data attribute contains spaces. Then the console throws the following error:</p>
  
  <pre><code>Uncaught Error: Syntax error, unrecognized expression: ul[data-topic=Test 2]
  </code></pre>
  
  <p>What's the issue here?</p>