Hey Radio, this pre’s for you

Little something for the RadioUserland users:

<pre>

And for that matter:

<title> <head>, and even <table width="5000">.

Oh, um, you did update Radio.root after yesterday’s fix for the double-decoding bug in the aggregator, didn’t you? I sure hope so.

One more bug to make Radio safe for incessant code posters: there’s still a double-decode between the aggregator and the posting form, when you post from the News page. I’ve got it stopped, by changing a couple of lines in radio.macros.weblogPostForm, from:


initialtext = radio.string.decodeEntities (adrstory^.storytext + viatext)
bundle //link the globe to the HTML rendering of the channel
add (globe + " <i>Source: " + radio.string.decodeEntities (adrstory^.channeltitle) + "; " + adrstory^.time + ".</i><br><br>")
add (radio.string.decodeEntities (adrstory^.storytext) + "<br><br>")

to:


initialtext = adrstory^.storytext + viatext
bundle //link the globe to the HTML rendering of the channel
add (globe + " <i>Source: " + radio.string.decodeEntities (adrstory^.channeltitle) + "; " + adrstory^.time + ".</i><br><br>")
add (adrstory^.storytext + "<br><br>")

but I’m not yet sure if that has unfortunate consequences with something other than the stuff I’ve tested it on so far. It does seem to work fine with less than, greater than, and ampersands: encoded once in the original post, they go through displaying their characters, but go into a post from the aggregator still encoded (as they should be), and encoded twice in the original post they go through displaying what they would look like encoded once, but are still double encoded in a post from the aggregator, just like they should be. I haven’t had much success with single encoded quotes or apostrophes, but I don’t really feel much need to post them encoded, anyway, so if Radio wants to turn &#39; into an unencoded apostrophe, that’s fine by me.

Did I mention that I can say things like <pre> without breaking Radio aggregators? Cool!

1 Comment

Comment by Jake Savin #
2002-10-04 21:27:56

Hi Phil,

You are correct — the calls to radio.string.decodeEntities in radio.macros.weblogPostForm do represent double-decoding — or I should say did.

I just tested and released your recommended change.

Thanks for the head’s up. :->

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.