Currently, when the content for a Colorbox come from having been passed through the javascript function replace(), the arguments being passed in are (currently) "'", "'". (See documents.email.php, lines 147 and 233, for example.)
This function signature will replace only the first occurrence.
If the intent is to replace all apostrophes with the entity equivalent, the global regex signature must be used, or use the javascript function replaceAll(). (However, replaceAll() is available in javascript engines compiled in 2021 or later.)
Currently, when the
content
for a Colorbox come from having been passed through the javascript functionreplace()
, the arguments being passed in are (currently)"'", "'"
. (See documents.email.php, lines 147 and 233, for example.)This function signature will replace only the first occurrence.
If the intent is to replace all apostrophes with the entity equivalent, the global regex signature must be used, or use the javascript function
replaceAll()
. (However,replaceAll()
is available in javascript engines compiled in 2021 or later.)Try:
.replace(/'/g,"'");