You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WordPress titles typically do not contain HTML, as far as I know, but special characters seem to be encoded as html entities (see also: https://stackoverflow.com/q/52229126/314056).
This is my solution for now:
constoldPopulateFields=wp2storyblok.populateFields;wp2storyblok.populateFields=asyncfunction(data,component_name,mapping,taxonomies){constfields=awaitoldPopulateFields.call(wp2storyblok,data,component_name,mapping,taxonomies);// note: textarea is a trick to avoid html injection, see also: https://stackoverflow.com/a/7394787/314056fields.name=newJSDOM(`<body><textarea>${fields.name}</textarea></body>`).window.document.body.firstChild.value;returnfields;};
It uses jsdom, which I'm already using for other purposes.
Since this project uses turndown, (which in turn uses domino), maybe that could be used in place of jsdom.
The text was updated successfully, but these errors were encountered:
WordPress titles typically do not contain HTML, as far as I know, but special characters seem to be encoded as html entities (see also: https://stackoverflow.com/q/52229126/314056).
This is my solution for now:
It uses jsdom, which I'm already using for other purposes.
Since this project uses turndown, (which in turn uses domino), maybe that could be used in place of jsdom.
The text was updated successfully, but these errors were encountered: