Use content field as data attribute in Views html
There are some limitations if you can't change the output templates for the view (and I'd assume if that's the case a views pre render is also out of scope). If you can accept them within the &lt;li&gt; (instead of on the &lt;li&gt;) you can rewrite the field to use a token. Make sure the field that is just data is listed before the field it will be attached to, enabled rewriting on the field, and use the field tokens to attach the value as an attribute. You'll most likely want to suppress the field from output and do some data cleaning to make sure invalid characters don't end up in the token (like ").



You can attach classes based on the row value to the li by using the same token you would use on the rewrite. Drupal will ensure it's safe for output, but then your data is a class and not the attribute you are seeking.

You'll have more control over the output, and you'll be able to build more elegant solutions if you use hook_views_pre_render() to modify the output more directly.