• I am working on a site and have had the most frustrating issue for 2 days – when saving a text widget, it would keep disappearing! One would show up, then after saving, all of the widgets saved in the sidebar I was trying to put it in were gone.

    I figured it out but I would still like some advice for a future solution because this … should not happen. I read through all of the theme code and am unable to find anything in there that is causing this, and I’ve had this problem on another site with a different theme once before – it was the exact same character as well, so I think it’s a WP related bug.

    What it is is that my coworker copied an address from Google Maps, which was copied into notepad++, and it contained what I found (on unicodelookup.com) to be a left-to-right marker (Dec 8206, Hex, 0x200E Html ?). I figured an invisible character would show up as some kind of invalid mark in notepad but it didn’t. So we spent the better part of 2 days trying to find the bug in this theme and even using a different theme. Finally someone suggested that it might be an invalid character like last time, so I used my arrow keys to navigate the text and lo and behold between a period and the last letter of a sentence, there was “something” extra. Deleting that fixed everything.

    Why does WP choke when this happens? Could it be a server setting? I did make a little test form in PHP and displayed POST-ed text raw and with htmlentities applied, and PHP itself didn’t have a problem with the extra character, it remained present, and when using ENT_HTML5 it was properly escaped.

    Thanks.

  • The topic ‘Left-to-right mark in text prevents widget saving’ is closed to new replies.