• Resolved saschapi

    (@saschapi)


    Hi!

    I tried this plugin on another project and it helped really well.

    With a new site I run into problems.

    This string does not translate:
    _e( 'Next Events <span>&raquo;</span>', 'tribe-events-calendar' )

    Problem seems to be the &raquo; which becomes » once saved.

    Any idea?

    thanks for you help in advance! 😉

    Sascha

    https://wordpress.org/plugins/say-what/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Lee Willis

    (@leewillis77)

    Hi;

    I don’t run the plugin in question, but I added the output you quoted to a dummy plugin and was able to override it just fine, so not too sure what the problem would be.

    Thread Starter saschapi

    (@saschapi)

    it does not work for me. While I can easily change other strings that do not contain html entities, strings with entities includes (same goes with & are a problem, as they seem to be saved as the UTF-8 counter parts.

    Plugin Author Lee Willis

    (@leewillis77)

    Hmm, I think I’ve managed to reproduce this. It works fine the first time you save the entry, but if you edit the replacement, the » gets replaced with the actual entry. I’ll see if I can work out a fix.

    Plugin Author Lee Willis

    (@leewillis77)

    So – this is because of an inconsistency (bug) in how one of WordPress’ internal string escaping functions works. I’m not really keen on working around that by using less-secure escaping features, but I’m confident it’ll get fixed in WordPress at some point.

    In the mean time, if you change the string, just swap the » for » before you save and you should be all good.

    Hope that helps.

    Plugin Author Lee Willis

    (@leewillis77)

    Just to follow up on this, part of the fix is included in v1.5 – however you won’t see any benefit from that in this case until you’re also running a version of WordPress that includes the fix from https://core.trac.wordpress.org/ticket/17780.

    The good news is that that looks like it will be in 4.3.

    Once you have that, then editing these will work as you’d expect.

    Thread Starter saschapi

    (@saschapi)

    Nice! Thank you for supporting your plugin so well! 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with html entities’ is closed to new replies.