Skip to content

Issue with the "mailto" anchors  #44

Description

@couteaudepoche

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions