wordpress 2.3 HTML entity bug

There is/was a rather annoying bug in wordpress 2.3. Normally when editing pages in the advanced editor, the actual text of the post/page has to be preprocessed to convert things like × to × so that it wouldn't show up in the editor as ×, and ditto for angle brackets. The extra ampersands and brackets would then be removed before saving. However, in the 2.3 upgrade a few things in the core structure of post/page retrieval had been changed and the somehow the the page-retrieval didn't do the pre-processing anymore. The upshot was that the amps and brackets got converted to normal ascii and unicode, seriouslycompletely messing up your pages.

I managed to track the problem to get_post() and get_page() in wp-includes/post.php. get_post() did get the upgrade, but get_page() didn't. The latter needs to be updated to carry and use a third parameter, and call sanitize_post() like get_post() does.

Of course, right after doing this I found out that a fix was already present in the SVN. Just update the file with this one. Ain't that always the way.


To see if you are affected as well, make a new page and input the following:

× > entities

Then hit `Save and Continue Editing'. If the text has changed to “× > entities”, you're in trouble: every page you edit in that state will have its entities converted. Get the fixed file as soon as possible.

←↓↑→

Now, I had planned to release new versions of usenti and git this weekend, with proper NDS-alpha and external tileset support. I was pretty well on schedule too. At least, up until last Tuesday. Around 23h, I decided to play a little StepMania (on keyboard, mind you; trying on a mat would probably count as a bad idea for me) as a temporary diversion. It went alright, so I did another run. And another. Next thing I know, it's 7am. Things got a little blurry after than >_>.

In any case, this has caused a slight delay. Most of the work is complete right now, actually, but there's still a few things I have to think about before releasing them and before I make the final decision, I have to stop seeing large numbers of arrows scrolling up on the inside of my eyelids. Sorry, but that's just the way it is.

On the bright side, I can finally clear some of the hard ones now ^_^.