• ChrisL

    (@chrslcy)


    I have an issue with processing embedded images which contain an email address inside an image element attribute. I believe this problem may be caused by the autolink.php functions.

    When an email contains an embedded image with HTML like this:

    <img explicitlogon="[email protected]" naturalheight="2000" naturalwidth="1429" size="196002" id="img537314" tabindex="0" style="max-width: 99.9%; user-select: none;" src="https://example.com/wp-content/uploads/2024/11/image.jpg">

    Then instead of the image being displayed in the resulting post, a truncated form of the HTML is presented in the post content, like this:

    [email protected]" naturalheight="2000" naturalwidth="1429" size="196002" id="img537314" tabindex="0" style="max-width: 99.9%; user-select: none;" src="https://example.com/wp-content/uploads/2024/11/image.jpg">

    Further inspection of the debug logs suggests that this is happening when the autolink_do is run.

    I am not sure exactly what’s happening but I suspect that the autolink_email function is processing the email which appears inside the explicitlogon attribute.

    Can I suggest that autolink functions only run on content which is outside of the angle brackets (<>) of html elements to ensure that html attributes are not processed?

    Clearly the explicitlogon attribute is added to the email of a lot of academic institutions:
    https://www.google.com/search?q=%22%3Cimg+explicitlogon%3D%22

    Happy to provide a copy of the debug logs if that helps.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.