quotation marks are wrongfully encoded, breaking the HTML
-
Hi
We have a text widget with words from the glossary, but for some reason the closing quotation mark of the
data-cmtooltip
attribute in their tooltip is encoded as"
, thus obfuscating all the following HTML.I found that the code creating the tooltip is in the glossaryFree.php file on line 2054, and if I change the quotation mark to a single quote and escape it, then it’s not encoded and the following HTML is fine.
This is the code as it is in the plugin:
$link_replace = '<a aria-describedby="tt" href="' . $permalink . '"' . $titleAttr . ' class="glossaryLink' . $additionalClass . '" data-cmtooltip="' . $tooltipContent . '" ' . $windowTarget . '>' . $titlePlaceholder . '</a>';
And this is the code after my fix:
$link_replace = '<a aria-describedby="tt" href="' . $permalink . '"' . $titleAttr . ' class="glossaryLink' . $additionalClass . '" data-cmtooltip=\'' . $tooltipContent . '\' ' . $windowTarget . '>' . $titlePlaceholder . '</a>';
But of course I can’t make this change in the code since it would be overridden by the next plugin update.
This happens only on one of our servers, a server that in on the Azure cloud and has PHP 7.4 on it. The bug doesn’t occur in our on premise servers running 7.3.
Do you have any idea why this would happen and how I can solve it?
- The topic ‘quotation marks are wrongfully encoded, breaking the HTML’ is closed to new replies.