title: drupal 6 custom menu attributes for jquery mobile
body: <p>I am trying to create a drupal 6 menu tree with additional attributes to make use of jquerymobile themeing, but drupal always gives me a blank WSOD whenever I tried to place additional attribute with a hypen in it which are common for jquerymobile.</p>
  
  <pre><code>  $primary_tree = menu_tree(variable_get('menu_primary_links_source', 'primary-links')); 
    //Trying to add attributes into the array below always fails: data-role="listview" data-inset="true" data-theme="a"
    $vars['main_menu_links_tree'] = preg_replace('/^&lt;ul class="menu/i', '&lt;ul id="main-menu" class="main-menu clearfix', $primary_tree, 1); 
  </code></pre>
  
  <p>My expected output will be:</p>
  
  <pre><code>  &lt;ul id="main-menu" class="main-menu" data-role="listview" data-inset="true" data-theme="a"&gt;
     .............
    &lt;/ul&gt;
  </code></pre>
  
  <p>The link to jquerymobile: <a href="http://jquerymobile.com/demos/1.0a1/#docs/about/../lists/lists-themes.html" rel="nofollow">http://jquerymobile.com/demos/1.0a1/#docs/about/../lists/lists-themes.html</a></p>
  
  <p>Any hint would be very much appreciated.
  Thanks</p>