Daedalon
Member
Posted 5 months ago #
When editing the formatting of for example the Single Location page and typing "& nbsp;" (without the space) for a non-breaking space, it gets saved in the database correctly, but when viewing the page again, it is shown in the editor as a regular space. Thus if you edit a different part of the setting field and save it, it is now saved into db as a regular space.
http://wordpress.org/extend/plugins/events-manager/
not sure there's much we can do about that... if we try to convert the & then it'll convert everything including the html tags.
Daedalon
Member
Posted 5 months ago #
Depending on how the conversion is currently done, one way is to double-encode every "& nbsp;" (without the space) before the display. Perhaps extend it to all "& something;" (without the space) special chars.
Something like $text = preg_replace( '_&([A-Za-z0-9#]+;)_', '& amp;$1', $text ); (without the space after "&") should do the trick.
could look into that in the future but there's other implications with that. For now I suggest you hook into the wp filter option_dbem.... for the options you need this on and apply this to the options you want to add this to.
if we add this for "& amp;" then the next request will be for some other entity :)
Daedalon
Member
Posted 5 months ago #
if we add this for "& amp;" then the next request will be for some other entity :)
For this I suggested doing it for all entities at once with the preg_replace above. Requires testing, though.
Will look into that filter, thanks.