I have the following code: opener.postConditionPostCure("<?php echo the_field('cure_description'); ?>")
In some cases the_field() returns ' " ) characters. I believe these characters are throwing errors. I have tried using the js fn escape() function as well as the php fn rawurlencode() as:
opener.postConditionPostCure(escape("<?php echo the_field('cure_description'); ?>"))
opener.postConditionPostCure("<?php echo rawurlencode(the_field('cure_description')); ?>")
to no avail.
I would like the entire string returned by the_field() to be passed to the postConditionPostCure function.
All advice is appreciated. Thanks in advance.