• Resolved gigapec

    (@gigapec)


    Tooltip terms with a single quote do not work (plugin version 3.3.6).

    Replacing
    $normalizedTitle = str_replace( ''', "’", preg_quote( htmlspecialchars( trim( $title ), ENT_QUOTES, 'UTF-8' ), '/' ) );
    by
    $normalizedTitle = preg_quote( htmlspecialchars( trim( $title ), ENT_COMPAT, 'UTF-8' ), '/' );

    and
    $glossary_title = str_replace( ''', '’', preg_quote( htmlspecialchars( trim( $glossary_item->post_title ), ENT_QUOTES, 'UTF-8' ), '/' ) );
    by
    $glossary_title = preg_quote( htmlspecialchars( trim( $glossary_item->post_title ), ENT_COMPAT, 'UTF-8' ), '/' );

    fixed the problem. I understand the code was supposed to change single quote ‘ to ’. Why is it so?

    https://ww.wp.xz.cn/plugins/enhanced-tooltipglossary/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author CreativeMindsSolutions

    (@creativemindssolutions)

    Hi gigapec,

    Thanks for this valuable input!

    This code was required to solve the problems that one of our French users had. I’ll dig out his case and test both solutions against it, and figure out the solution to the problem.

    ps. Could you share more information about your case? What’s the term and where it doesn’t work?

    Best,
    CM Plugins

    Thread Starter gigapec

    (@gigapec)

    Hello,

    Two terms were not working : “artif’” and “terrain d’aventure”.

    The problem is that the current code changes ‘ to ´ but not everywhere. You could either not change it (the patch I wrote above) or change it everywhere (one line needs to be changed if I recall correctly).

    I would prefer not to change ‘ to ´ to be consistent with non-glossary words.

    I’d be curious to know more about the bug this fixes.

    I also experienced same problem with the French somewhere on the page it might work (words with apostrophes) sometimes it doesn’t.

    Plugin Author CreativeMindsSolutions

    (@creativemindssolutions)

    Hi,

    The code from gigapec will be replaced in the next release (soon).

    Best,
    CM Plugins

    Thread Starter gigapec

    (@gigapec)

    Whops, I had it wrong!

    I just understood why you had this code in the first place. WordPress actually replaces single quotes to ’, hence the original code was needed.

    My problem is that I use Page Builder plugin which disables the single quote to ’.

    How to make a single entry with s’est trompée ?
    s’est trompée is not detected by the plugin.
    The entry is created and working in index page. But the instances not detected in posts and pages.

    • This reply was modified 9 years, 3 months ago by unlambda.
    • This reply was modified 9 years, 3 months ago by unlambda.
    • This reply was modified 9 years, 3 months ago by unlambda.

    RESOLVED on my side also.
    It was a problem of apostrophes.
    s’est trompée
    s’est trompée
    It took me too long time.
    Second example in bold is actually
    s'est trompée
    How to stop WordPress do that ?
    I’m using Pro.
    Can you please fix that in CM Glossay Pro and Free ?

            Hamlet's father's ghost (U+0027)
            Hamlet’s father’s ghost (U+2019)
    • This reply was modified 9 years, 3 months ago by unlambda.
    • This reply was modified 9 years, 3 months ago by unlambda.
    • This reply was modified 9 years, 3 months ago by unlambda.
Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Single quote problem’ is closed to new replies.