Antispam plugin v1.5.7 and Page Toc plugin v3.2.4 activated : Issue with the "mailto" anchors
The Antispam code in the HTML send to the browser looks like:
document.write("<a href='mailto:"+link+"' >"+link+"");
However, Antispam injects the following code into the page before it is being send to the browser:
document.write("<a href='mailto:"+link+"' >"+link+"</a>");
A bug has been logged on PHP: Bug #74628 DOM auto remove HTML closing tag in <script> tag when save .
It describes exactly the issue of DOMDocument "eating" closing tags in javascript.
The thread offers two different solutions:
- Add a backslash (\) at the closing: </a> tag becomes </a>
This should be done by the author of AntiSpam in antispam.php line 196
Add an extra flag LIBXML_SCHEMA_CREATE when loading HTML into the DOMDocument
- This should be done by the author of PageToc in file HtmlHelper.php on line 37
Antispam plugin v1.5.7 and Page Toc plugin v3.2.4 activated : Issue with the "mailto" anchors
The Antispam code in the HTML send to the browser looks like:
document.write("<a href='mailto:"+link+"' >"+link+"");
However, Antispam injects the following code into the page before it is being send to the browser:
document.write("<a href='mailto:"+link+"' >"+link+"</a>");
A bug has been logged on PHP: Bug #74628 DOM auto remove HTML closing tag in <script> tag when save .
It describes exactly the issue of DOMDocument "eating" closing tags in javascript.
The thread offers two different solutions:
This should be done by the author of AntiSpam in antispam.php line 196
Add an extra flag LIBXML_SCHEMA_CREATE when loading HTML into the DOMDocument