On preview, zipperhead. January 11, 2008 9:31 AM   Subscribe

Previewed HTML works fine, posted HTML less so...

This is on Ask, and is visible in my recent question. I previewed extensively and paid close attention to the "if there is HTML makes sure it looks ok", and it DID look ok. But I posted it, and it sure doesn't look ok anymore, and now I look like a zipperhead, and everyone who reads my post thinks "That zipperhead didn't preview" but I did. Oh, lord, I really did.

If it's too much or too tricky to make the preview match the post, can we at least put up a warning sign for zipperheads like me, saying that the two don't necessarily match?
posted by dirtdirt to Bugs at 9:31 AM (35 comments total)

I'm sorry.
posted by Dave Faris at 9:38 AM on January 11, 2008 [2 favorites]


The problem is that for preview, you are escaping the HTML once, but when you post, it gets stored as-is (rendered). You'd have to escape it twice (like this: &>). Since we don't get code in questions often, I haven't felt like a special code field was necessary. For the tech question category, I'm pretty sure we show a link to a code-sharing site that posts everything as plain text.
posted by mathowie (staff) at 9:39 AM on January 11, 2008


Another way to bork-proof it:

1. escape your code once;
2. copy your final post text prior to preview;
3. hit preview, and make sure everything looks right;
4. paste original code;
5. hit post.

A little bit of a runaround, but there you go. You dang zipperhead.
posted by cortex (staff) at 9:53 AM on January 11, 2008


Ah. I understand what happened now, I appreciate the workaround and I will never make that mistake again. Still, the utility of preview is lessened by the fact that you are not actually previewing what you will see. I suspect future zipperheads may stub their toes on this as well.

Also, the code that I was posting was a plain vanilla HTML table, being used for it's intended purpose: to display tabular data.
posted by dirtdirt at 10:03 AM on January 11, 2008


From the FAQ:

Not all HTML is allowed. If you stick to simple text formating (b, strong, i, em, a) and lists (ul/li/ol) you'll be ok. Things like tables, embeded video code, javascript, images, and inline styles will be stripped out.
posted by burnmp3s at 10:06 AM on January 11, 2008


Also from the FAQ:
If you are wondering if your HTML code will display properly, please use the Preview button before your post. The Preview will load a new page and filter out any harmful HTML showing you exactly what you will see if you submit your comment.
posted by dirtdirt at 10:18 AM on January 11, 2008


You're saying that table, tr, td tags survived into Preview? Huh.
posted by cortex (staff) at 10:19 AM on January 11, 2008


Absolutely correct, yes.
posted by dirtdirt at 10:21 AM on January 11, 2008


Just tested. Table tags live through AskMe post preview indeed. I think there might be something out of date, there.
posted by cortex (staff) at 10:24 AM on January 11, 2008


On the preview page, why is the content not HTML-escaped before it gets dumped between the textarea tags? Surely that would fix this.
posted by chrismear at 10:29 AM on January 11, 2008


Wouldn't want to be mistaken for a zipperhead.

My Talking Dennis Miller Doll uses this word. What else does it mean?
posted by Ambrosia Voyeur at 10:32 AM on January 11, 2008 [1 favorite]


Yuck. Rest assured I never heard it mean anything but "dummy". It was in pretty common usage with no racial overtones whatsoever where I grew up (central Massachusetts). I'll remove it from active use. Sheesh.
posted by dirtdirt at 10:38 AM on January 11, 2008


Our HTML filter takes off the first table tag, but leaves in the tr, td, and closing table tag. So the table won't work (as mentioned in the FAQ), but that is confusing when you're previewing a comment.
posted by pb (staff) at 10:39 AM on January 11, 2008


Wordspy says 1989 is earliest citation (in central Mass, in fact). I hope and suspect the racist crap is a retrofit.

The word is probably still soiled, though.
posted by dirtdirt at 10:41 AM on January 11, 2008


Yeah, from it being a Dennis Miller soundbite, I sort of conflated it with Dittohead, but I dunno.
posted by Ambrosia Voyeur at 10:43 AM on January 11, 2008


The HTML filter is now stripping out tr and td so hopefully that will help show that tables won't work on preview.
posted by pb (staff) at 10:50 AM on January 11, 2008


The Racial Slur database also says "this database was created entirely from data gleaned off the 'net and via submissions from people like you and your parents. It's supposed to be funny and/or informational. " And it uses many of the same theories proposed at UrbanDictionary, which all date since 2003.

Clearly, even if someone decided today to use a heretofore inoffensive term as a racist term and it gained traction *poof* it's a racist term. Still, I am not sure how much credence I want to give to UrbanDictionary. I haven't searched that that THAT hard but pretty much everything I've found through Googly has been innocuous, with the notable exception of UrbanDictionary and RSDB. Not that it really matters. Like I said before, the word is soiled.
posted by dirtdirt at 11:11 AM on January 11, 2008


"My Talking Dennis Miller Doll uses this word. What else does it mean?"

I was only familiar with it in reference to tank crews—the "zippers" being stitches on their skulls from getting banged around without a helmet on.
posted by klangklangston at 11:15 AM on January 11, 2008


The online OED has two meanings for zipperhead: "1. A stupid person, a fool.", with a first quotation from 1967.

And "2. orig. Mil. (offensive)." First quotation: 1967 Pacific Stars & Stripes (Tokyo) 5 Nov. 7/3 Visitors to Pleiku's number one museum are greeted by Charlie Zipperhead, a rifle-toting North Vietnamese dummy. The second is more clearly offensive, from 1973: The zips... Zipper heads, the gooks, sloops [sic], dinks.

There's even a reference to American Psycho: 95, I would have found a way to get to Exeter where I would pour a bottle of acid all over their son's slanty-eyed zipperhead face.
posted by skynxnex at 11:20 AM on January 11, 2008


And I was some how able to leave out that the actual definition for meaning 2 was "= zip n.3", and that links to a definition of "A native of East or South-East Asia or person of East or South-East Asian descent; spec. a Vietnamese person." and with a note that it was probably a shortened form of zipperhead. Marked with US Mil and offensive.
posted by skynxnex at 11:24 AM on January 11, 2008


Well I guess that's that, then.
posted by dirtdirt at 11:27 AM on January 11, 2008


"On the preview page, why is the content not HTML-escaped before it gets dumped between the textarea tags? Surely that would fix this."

Yeah I've always been puzzled by the lack of escaping, surely it's an oversight?
posted by malevolent at 11:44 AM on January 11, 2008


( . ) ( . ) ( . )
posted by mds35 at 12:18 PM on January 11, 2008


Well, the triple-tit tags are working just fine.
posted by mds35 at 12:18 PM on January 11, 2008


I previewed extensively and paid close attention to the "if there is HTML makes sure it looks ok", and it DID look ok. But I posted it, and it sure doesn't look ok anymore, and now I look like a zipperhead, and everyone who reads my post thinks "That zipperhead didn't preview" but I did. Oh, lord, I really did.

Can I just say, this is the first MeTa post I've read in the past few days that didn't make me want to rip out my own eyeballs with a shrimp fork rather than ever read another one? You may be a zipperhead, but I love you.
posted by FelliniBlank at 2:12 PM on January 11, 2008


Yee-ow, I thought I had heard all the racist Vietnam War terms during the war, but apparently I was spared this one until now. In the Midwest I also only ever heard it (rarely) as a synonym for "whatta maroon, what an ignoranimus."
posted by FelliniBlank at 2:23 PM on January 11, 2008


Nobody wants to point out how ludicrous it is that even matthowie can't manage to post simple HTML code here?

>You'd have to escape it twice (like this: &>).
posted by AmbroseChapel at 4:20 PM on January 11, 2008


If you use the non-breaking space code, intending to line code up properly with a fixed font, Preview turns it into just spaces, and it looks perfect. But if you then post it, Preview has already changed all the nbsps to " ", and then on the later previews or posting, the extra spaces are stripped out. So you preview, it looks fine, you hit post, and it sucks. One preview looks fine, but it hopelessly munges your formatting so that later previews and/or posting will be broken. To be sure a post will look right, preview TWICE... if it survives two previews, it will post.

If you get bit by the previewing bug, one workaround, as Cortex says, is to keep a copy in a text editor, and repaste/post without previewing when previews come out right.

Personally, I think Preview shouldn't modify what's in the edit box.
posted by Malor at 8:01 PM on January 11, 2008


Well I guess that's that, then.

Satisfying, wasn't it? It has always been the MeFi way to fix broken stuff by breaking it more. Remember this well.
posted by chlorus at 8:07 PM on January 11, 2008


Nobody wants to point out how ludicrous it is that even matthowie can't manage to post simple HTML code here?
--AmbroseChapel

I think he did that on purpose. He appears to have doubly-escaped the HTML entity, by way of an explanation to the OP.
posted by philomathoholic at 10:45 PM on January 11, 2008


In the nicest possible way, that's nonsense. Clearly, just like everyone else, he tried to do HTML/escapes, and the unpredictable behaviour of the code turned around and bit him.

From the source, it looks like he was trying to do a double-escape, but the joke was on him because he needed a triple-escape.
posted by AmbroseChapel at 2:01 AM on January 12, 2008


cortex: You're saying that table, tr, td tags survived into Preview? Huh.

Yes. I had the same happening with a comment here.
posted by DreamerFi at 3:37 AM on January 12, 2008


Preview shows the [HR] tag correctly, but MeFi fails to use it.
posted by five fresh fish at 7:32 PM on January 12, 2008


My favoured way to b0rk-proof carefully formatted posts:

1. Escape as required.
2. Click Preview to make sure all looks right.
3. Click the browser's Back button.
4. Return to step 1 if necessary.
5. Click Post.

I've found two different ways to post reasonable-looking code:

1. Replace every < with &lt; and every space with &nbsp; and wrap the whole lot in <code> tags
2. Escape every < with &lt; and every newline with <br> and wrap the whole lot in <pre> tags

I'd be much happier if <pre> did not double-space every newline, and have never understood why it does.

I also agree with Malor that having Preview modify the edit box is a bug.
posted by flabdablet at 6:33 PM on January 13, 2008


From the source, it looks like he was trying to do a double-escape, but the joke was on him because he needed a triple-escape.
--AmbroseChapel

Oh, I get it now (well I got it a day ago, but I'm just finally commenting).
posted by philomathoholic at 1:42 AM on January 14, 2008


« Older The icing on the snowplough   |   Don't post threads about posting MeMail in threads... Newer »

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