Hopefully, this does the trick.
It appears to just be a mix-up of what value to set prop_opt_preformatted to. You should set it to true (1) if the entry is preformatted, and false (0) if it needs to be autoformatted. The perl client had it backwards.
[Update]: Well, that did the trick, for the most part. Only thing is, I have vi set to wordwrap, which inserted some superfluous <br> tags. Had to fix that by hand. Need to come up with a way to disable that, but only when vi is called from the perl LJ client.