• Resolved Lorangeo

    (@lorangeo)


    Hi,

    I’m using a plugin that dynamically find and replace some specific words in my content. This plugin was doing some weird things on the Download Manager pages (breaking some elements), until I noticed that the single quotes (‘) were not correctly escaped in the image ALT attributes of the featured images in the table/category listings.

    Here is an example of bad DM HTML output (look at the Alt attribute):

    <img class="wpdm-thumb wpdm-thumb-96x96 wpdm-thumb-41" src="https://example.com/wp-content/uploads/wpdm-cache/xyz.png" alt="Police d" écriture="" cursive="" (suisse="" romande)'="">

    The package name was:

    Police d'écriture cursive (France)

    (containing a straight single quote “‘” in its title). As you can see, the ALT attribute is messed up. And this causes a big problem in my setting.

    How to replicate the problem:

    1. Create a new package with a single quote in its title (straight single quote instead of curly quote)
      Example:
      That’s not fun
    2. Set a featured image for this package.
    3. Publish.
    4. Check the result in the package listings (for example using the block editor “List packages”). The ALT attribute of the thumbnail (featured image) is messed up.

    Would it be possible to fix this? I’m willing to buy the PRO version, but this issue breaks my page.

    • This topic was modified 9 months, 3 weeks ago by Lorangeo.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Not escaping singles quotes (‘) in images “Alt” attributes’ is closed to new replies.