Hello, I wrote a simple mod to replace a BBCode by some HTML, but the input and output are escaped with " and
I use this command
array(
'tag' => 'prodibi',
'type' => 'unparsed_content',
'content' =>'<div><script>document.currentScript.parentElement.setAttribute("data-prodibi",\'$1\'.replace(/"/g, "\\"").trim())</script></div>'
);
the $1 variable is suppose to be some json input like { "width": 3590, "height": 5384, "heightMode": "aspectRatio", "id": "2ej1ko0dd7gddd" }
but looks like
{ "width": 3590, "height": 5384, "heightMode": "aspectRatio", "id": "2ej1ko0dd7gddd" }
How can I get the raw content instead of the escaped one?
and when I set the 'content' with something like
'<div>
<script />
</ div>'
it results in something like that that is not working
'<div>
<script />
</ div>'
how can I output raw HTML?
Thank you by advance :)