• 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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You can try using

    &apos;

    for the apostrophe in the title … it’s a bit clunky but should work.

    Thread Starter juanlopez4691

    (@juanlopez4691)

    I don’t think it would work. I tried using
    &#039; but & (ampersand) char is replaced by its HTML entity &amp; and I get
    El Zoo d'en <a href="http://whatever.com" title="Zoo d&amp;#039;en Pitus">Pitus</a>

    did you try a slash? Perhaps it’s some weird PHP parsing thing:

    Zoo d\’en Pitus

    Thread Starter juanlopez4691

    (@juanlopez4691)

    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(); ?>
    Thread Starter juanlopez4691

    (@juanlopez4691)

    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).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Apostrophe in title attribute of links’ is closed to new replies.