Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the "mailto" anchors #44

Open
couteaudepoche opened this issue Nov 6, 2024 · 0 comments
Open

Issue with the "mailto" anchors #44

couteaudepoche opened this issue Nov 6, 2024 · 0 comments

Comments

@couteaudepoche
Copy link

couteaudepoche commented Nov 6, 2024

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:

  1. 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
  2. This should be done by the author of PageToc in file HtmlHelper.php on line 37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant