• Resolved fxpep2b

    (@fxpep2b)


    Hi,

    In french apostrophes are very common like in the title of my site : L’informatique.

    Wordpress encodes apostrophes in blogname and blogdescription with ' (')

    As a consequence, SuperPWA creates a json with:{“name”:”L'informatique

    It would be great if your plugin could track this html code and automatically convert it to: {“name”:”L\u0027informatique
    or just to: {“name”:”L’informatique

    As a workaround, I added a line in my function.php to manually add the apostrophe in the title:

    
    update_option("blogname", "L'informatique pour les littéraires");
    

    Thanks for this great plugin
    Hope this helps improve the internationalization of your plugin.

    François

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @fxpep2b,

    Good day and thanks for using our plugin.

    Can you please let me know whether you have updated the settings page of SuperPWA with apostrophe ?
    FYI: Within the settings page you can change the Application Name and description easily.

    Thread Starter fxpep2b

    (@fxpep2b)

    Hi,

    You are right. If I correct the title field in the superpwa setting page, then the correct encoding is applied.
    (Actually, just by modifying something in the field, all the apostrophes are correctly rendered in the json)

    But by default, the name that appears in this field after the install is incorrect (because it uses the wordpress version of the blogname).

    Your solution is a lot easier than my workaround.
    Thanks for your hyperspeed answer.

    François

    Hello François,

    Glad to hear that Jose’s suggestion helped!

    I wanted to point out a potential problem with your work around.

    WordPress loads and executes functions.php on every page load of the front end. If you add update_option("blogname", "L'informatique pour les littéraires"); to your functions.php and leave it there, this will be executed every time a user visits your website and on every page load.

    Writing to the database on every page load is not a good idea from a performance stand point. Since this info needs to be updated only once, its much better to update it from the WordPress admin.

    Does that make sense? Please let me know otherwise. Happy to explain further if needed 🙂

    Hope you enjoy SuperPWA! Please tell your friends about it and also I hope you can link to us in your article.

    Best regards.

    Thread Starter fxpep2b

    (@fxpep2b)

    Hi Arun,

    Thank you very for your additional intel. It makes perfect sense.
    Really great plugin! And very good support.

    Best regards
    François

    Awesome!! Happy to hear that Arun’s tip helped you more.

    Have a great day and expecting your future support for SuperPWA.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘apostrophe in site title wrongly encoded’ is closed to new replies.