It’s days like these that make me appreciate free software. Whenever I
would post a blog entry with HTML’s ‘pre’ stanzas in it to
livejournal via ljupdate, the
entry would appear horribly mangled (exhibit
1). That in itself is not too bad, since I could go immediately to
the livejournal website and edit it to display properly, but when the
entry got syndicated on kerneltrap, it would make the
page impossbile to view. Unacceptable – exhibit 2.
So I dug into the ljupdate source code to figure out what was going
on. It turns out that ljupdate would munge the text in order to
prepare it for livejournal’s incoming filters, which would demunge it
into proper HTML. Unfortunately, the munging would destroy ‘pre’
stanzas, rendering them all on one long line.
After ascertaining that this was the problem, I set out to fix
it. First I tried to get ljupdate to not munge ‘pre’ stanzas, but
then, after reading this
post, I decided to implement an ‘HTML mode’ flag. A few hours
later and several tens of test posts later, it works.
all on different lines!
ljupdate-allow-the-user-to-mark-post-as-html-A1 is the ljupdate
fix. Now to integrate with ljablog.el…
Leave a Reply