I have json array (containing both apostrophe and quotes):
[{"type":"error","head":"Chyba na serveru","body":"Data truncation: Out of range value for column 'price' at row 1"}]
I want to give this array to custom element as attribute. So obvious way would be HTML code (xml escape):
messages="[{"type":"error","head":"Chyba na serveru","body":"Data truncation: Out of range value for column 'price' at row 1"}]"
But polymer won't parse this as array. If I don't escape value, it will break HTML code.
Also html escape doesn't work:
messages="[{"type":"error","head":"Chyba na serveru","body":"Data truncation: Out of range value for column 'price' at row 1"}]"
Note this works fine:
messages='[{"type":"error","head":"Chyba na serveru","body":"Data truncation: Out of range value for column price at row 1"}]'