Muli Ben-Yehuda's journal

February 14, 2004

Filed under: Uncategorized — Muli Ben-Yehuda @ 3:32 PM

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 Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: