I’m trying to set the content of a metadata WYSIWYG field as a variable in a Server Side JavaScript block. The problem is that the metadata field contains Snippets and any escaping of quotes doesn’t seem to apply to the snippet. If I use something like:
var value = "%asset_metadata_blah^escapequotes%";
var value = "%asset_metadata_blah^replace:":\"%";
and the snippet contains a "
then the JS breaks because the quote in the snippet isn’t being escaped. The regular content within the field is escaped fine, it’s just what’s in the snippet that’s the risk.
Has anyone else come across this?
Matrix Version: 5.5.1.5