Html: nonscalar data-* attributes are encoded as JSON [Closes #1399]

Before they was encoded as CSS styles or space separated lists.