• Resolved Outerbridge

    (@outerbridge)


    Hello

    I’d like to show the <title></title> in the source code with the special characters output as they are in “natural” language.

    For example, I want to see:
    <title>à l'étranger</title>

    rather than:
    <title>à l'étranger</title>

    I’ve tried things like:
    $output = htmlspecialchars_decode( $output, ENT_QUOTES ); on the wpseo_title filter but nothing works.

    Can you help please?

    Many thanks
    Outerbridge

    • This topic was modified 2 years, 3 months ago by Outerbridge.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello Outerbridge,

    Thanks for reaching out about your SEO title. I tested this by using the phrase à l'étranger as the SEO title, and it worked well. Here’s what it looks like in the frontend and what it looks like in the page source.

    Can you share a screenshot of the result when you try from your end without using that filter? Also, are you using the latest versions of WordPress and Yoast SEO?

    Thread Starter Outerbridge

    (@outerbridge)

    Hello Maybellyne

    Thank you for your reply and the screenshots. I am using WP6.1.1. and Yoast 19.11.

    Apologies, I don’t think my previous post displayed correctly…
    I am seeing the same results as you but rather than seeing <title>à l& #039;étranger</title> in the raw source code, I would like the actual text <title>à l'étranger</title>. I.e. I want the source code to display ' not & #039; (space added to make it print on screen).

    With and without the code in my opening post, I get the same output as you in your last screenshot https://pasteboard.co/ws310CSrs3zk.png

    Many thanks
    Outerbridge

    @outerbridge

    To clarify, Unicode escape encoded characters can be properly read by Googlebot and other crawlers without any issues, there won’t be any issues with it.

    For instance, if you check this article https://yoast.com/making-the-web-better/, the title is <title>Making the web better: an interview with Joost & Omar • Yoast</title>. It shows the encoded value for the ampersand and the title separator, but if you hover over the browser tab, the correct title should show up. Also you can see the correct SEO title on the search result here.

    You would also expect that this would be the title that would output in the search results and not the one with encoded values.

    I hope that clarifies your concern.

    Plugin Support Maybellyne

    (@maybellyne)

    This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.

    Thread Starter Outerbridge

    (@outerbridge)

    Many thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Print decode special characters in wpseo_title’ is closed to new replies.