Wrapping html may encode html attributes

wrapHTML has to encode attribute values:
{ "data-content": "my \"encoded\" content" }

has to be converted to:
data-content="my &quot;encoded&quot; content"