bug with the autotranslation of certain characters into HTML codes March 16, 2002 8:35 PM   Subscribe

There's still a bug with the autotranslation of certain characters into HTML codes. In this thread I just posted, each paragraph describing the AIMbots began with an equals sign followed by a greater-than sign. Hitting "preview" retained these characters, though in the actual text-entry box, they'd all been turned into "=>". Then, upon posting, they all showed up as "=>".
posted by aaron to Bugs at 8:35 PM (8 comments total)

:::sigh::: Needless to say, the mere act of posting this message caused them to re-retranslate improperly. Maybe if I use PRE...
Hitting "preview" retained these 
characters, though in the actual text-entry box, they'd all 
been turned into "=>". Then, upon posting, 
they all showed up as "=>".
posted by aaron at 8:38 PM on March 16, 2002


Yes, there, that's how they looked.
posted by aaron at 8:38 PM on March 16, 2002


Some browsers will resolve character entities so when you submit "&" it's inserted by between the textarea tags as the exact same, but then rendered to you as "&". When you submit that it submits the rendered version so between the textarea tags it has "&" which is then rendered back to you in the textarea as "&". Ever decreasing circles.

Are the characters you submit the same ones you get back in the source code between the textarea tags?
posted by holloway at 10:34 PM on March 16, 2002


In other words, take & and keep previewing. In HTML you'll see whatever you previously submitted but the textarea will show one less amp; and it's the textarea that is submitted.
posted by holloway at 11:07 PM on March 16, 2002


aaron, are you using mac ie 5.12 on os x? I've realized a lot weird stuff in that browser that doesn't happen in any other browser I've used on metafilter.
posted by mathowie (staff) at 11:34 AM on March 17, 2002


No, I'm using IE5.1/Mac on (and I'm ashamed to admit this, but I can't afford anything better) 8.6. Holloway's theory is correct though: put a tons of amps in the textarea and keep previewing, and every time I'll end up with one less amp, until I'm finally left with a single actual ampersand.
posted by aaron at 12:21 PM on March 17, 2002


Netscape 4, Opera 5, IE6 and Mozilla (Windows), Konquerer and Opera 6b1 (Linux) do this. Assuming all browsers do this a work around would be to change all occurences of & to &.
posted by holloway at 1:24 PM on March 17, 2002


when re-outputting text input (either as a value attribute of a text input element or as the contents of a textarea), you have to encode the basic html entities (less-than and ampersand, and quotes when dealing with a text input). metafilter does not do this, so you end up losing a layer of encoding each time you preview your submission.
posted by jimw at 4:06 PM on March 17, 2002


« Older Mob-style takedown   |   Legal action ahoy! Newer »

You are not logged in, either login or create an account to post comments