Strange posting results with no code errors. August 16, 2007 7:38 AM   Subscribe

AskMe posting bug - forced lowercase and paragraph splicing
posted by Meagan to Bugs at 7:38 AM (14 comments total)

I just finished posting my recent question about guitars, and a few weird things happened. The second-to-last paragraph mysteriously merged with the paragraph before and had all of its capitals changed to lowercase, and there's a problem with the small tag I inserted (the < was deleted).
This is the exact c&p from the more inside box used prior to submission (except for the spaces I just added to the small tags):
*******
I've been learning to play guitar on a well-used Yamaha belonging to my dad for the past year now, and I think it's time to buy my own guitar. However I'm having trouble deciding what price range I want to stay in. My budget is around $600, but I'm willing to spend less or more if needed.

I'm not sure what model Yamaha it is, but in general I enjoy playing on it. Regular sized, steel strings. The neck feels a bit too wide for my smaller hands, but I haven't had any serious problems playing as is. I'm pretty sure this guitar was closer to the cheap end of the guitar price spectrum.

The biggest problem I'm having now is simply deciding what price bracket to investigate. I'm torn between buying a cheaper guitar now and then buying another better one next year, or spending the money now and playing a nicer instrument. As I'm a student, money is a bit of an issue, but this is something I've wanted for awhile now and my partner fully supports buying one (I don't tend to buy many things). If you bought a guitar, where on the price spectrum was it, and are you pleased? If you have both a cheap and expensive guitar (< $1000), do you think it's worth shelling out the money now for a nice or is my assumption wrong, and there's simply not enough of a difference within my price range, as the truly high quality are in the thousands?br>
As well, if you have any recommendation for an exact guitar model, feel free to suggest it. I have no idea about whether certain models are not available where I live (Ottawa, Canada) as I will obviously see and play it in person before buying, but there are quite a few guitar shops in the area so I'm not too worried.

< small>I'm aware of the whole it's-a-personal-decision go-find-one-that-loves-you angle, no need to point it out.
*******

I just noticed I used a < in the paragraph prior, and from that point on all caps are lowered. That could very well be the problem. That would explain why the subsequent small tag didn't work right.
Sorry if this has been mentioned before, a few quick searches for < and angle bracket showed no results.
posted by Meagan at 7:39 AM on August 16, 2007


And I see there was another similar bug in posting that same code here, in a strange parsed br> tag. I'm just a bit surprised that in all my time here I've never noticed that there are problems in using angle brackets.
posted by Meagan at 7:41 AM on August 16, 2007


Part of the problem is that you really should use and escape character for your angle brackets—where you have <, you should instead use &lt; to prevent the submission form from interpreting it as the beginning of an HTML tag.

And unfortunately, I think the Preview view will translate such escape characters into literal < characters, so that when you Preview and then Post you get caught out if you don't go back and refix. That specifically is kind of a recurring pain and something we might want to look into.

I'll try to fix up your post in the mean time. The caps thing is honestly mystifying to me.
posted by cortex (staff) at 7:44 AM on August 16, 2007


Something in the preview box converts uppercase HTML to lowercase. (here I am shouting "SMALL.")
posted by Tuwa at 8:24 AM on August 16, 2007


Oh ho! So if it has what it interprets as a great big tag, it'll lc the whole thing. Nice, Tuwa.
posted by cortex (staff) at 8:40 AM on August 16, 2007


ANYTHING THAT CODE DOES CORRECTLY IS AN ACCIDENT.
posted by quonsar at 8:49 AM on August 16, 2007


*smacks the quonsar box*

Is this thing working right? The readout is fuzzy, and meaningless.
posted by carsonb at 8:55 AM on August 16, 2007


< abcd
posted by smackfu at 8:57 AM on August 16, 2007


<I TYPED THIS IN CAPS
posted by empath at 2:51 PM on August 16, 2007


And now:

< abcdbr>
Maybe it's been fixed? Dunno.
posted by Tuwa at 3:35 PM on August 16, 2007


HRM, ah, in preview it showed "<ABCD"

Why, of all things, assume a break for the tag completion? Why not just >? (Something I'm missing here, as usual?)
posted by Tuwa at 3:36 PM on August 16, 2007


Lemme see if I can nail this down.

Short answer: a literal '<' character used as punctuation (a) in the only or the final paragraph of a comment that also (b) has no html later in the comment will work fine.

Details:

The problem occurs when an unmatched '<' is followed by an html tag. The < is interpreted, then, as matching the > symbol that ends the html tag in question—and everything between is treated as the content of said tag, e.g.

orig: 10 < 20 (and MAN you <i>BETTER</i> BELIEVE IT)

output: 10 < 20 (and man you i>BETTER BELIEVE IT)

Note that:
- MAN gets decapsed by the parser because it's interpreted as text internal to a the 'HTML tag' defined by as < 20 (and MAN you <i>
- the <i> tag itself gets broken an so there are no italics;
- the </i> closing tag is now unmatched, and so gets elided
- and everything after the fake-o weird tag is left in unaltered caps because it's not part of the tag.

So that answers (b).

As for (a): mefi automatically inserts a <br> tag at every line break in a comment. It looks like that gets inserted by the post/preview function before the tag-matching code runs; consequently, if you have a comment with an unmatched < followed by a line break and any further text content, it does the broken tag-closure stuff against that newly injected <br> tag.
posted by cortex (staff) at 3:54 PM on August 16, 2007


<3 the 3 is uppercase
posted by kindall at 5:17 PM on August 16, 2007


...and that's why they don't use HTML in most web forums. Because > and < are pretty shitty escape characters.
posted by smackfu at 5:18 PM on August 16, 2007


« Older I can has TWOO divabats?   |   what? Newer »

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