juanlopez4691
Member
Posted 3 months ago #
Apostrophe characters (', same as single quote) are replaced by double quotes (") in title attribute f entries links. If I insert a link like:
El Zoo d'en <a href="http://whatever.com" title="Zoo d'en Pitus">Pitus</a>
I get
El Zoo d'en <a href="http://whatever.com" title="Zoo d"en Pitus">Pitus</a>
Which breaks HTML code.
I have been searching this forum and Google for a solution but found no definitive solution (disabling wptexturize doesn't seems to solve the problem). Any ideas?
You can try using
'
for the apostrophe in the title ... it's a bit clunky but should work.
juanlopez4691
Member
Posted 3 months ago #
I don't think it would work. I tried using
' but & (ampersand) char is replaced by its HTML entity & and I get
El Zoo d'en <a href="http://whatever.com" title="Zoo d&#039;en Pitus">Pitus</a>
did you try a slash? Perhaps it's some weird PHP parsing thing:
Zoo d\'en Pitus
juanlopez4691
Member
Posted 3 months ago #
Yes, I tried the slash, and then I get the slash displayed too.
What's the code displaying this in your theme?
It should be:
<?php the_title_attribute(); ?>
juanlopez4691
Member
Posted 3 months ago #
greenshady, I am talking about links included as part of posts content. The HTML title attribute of those links is the problem (if there's an apostrophe in it).