Only escape necessary characters in data-* attributes [closes #1075]

Within quoted attributes, `<` and `>` lack special meaning,
so escaping them here should be unnecessary.