Preview bug lite June 26, 2012 6:23 PM   Subscribe

I discovered just now that closing an <a> tag with an </i> tag looks correct in preview but blows up in the actual comment.

I'm also afraid to post this, using entities that look right in the preview, but are surely conspiring right now make me look foolish.

I also searched, but if this is a known issue, or "who cares don't abuse the poor html like that", etc. a thousand pardons.
posted by Bokononist to Bugs at 6:23 PM (81 comments total)

First a bit of clarification please—when you say preview do you mean
the instant preview under the comment box
or
what you see once you click the 'Preview' button?
posted by carsonb at 6:42 PM on June 26, 2012




[italics for fun/test]
And is this the comment you're talking about?
posted by carsonb at 6:43 PM on June 26, 2012


'Cause it looks fine to me. And the html catcher handled closing an <a> tag with </i> like a champ, ending both where I intended.
posted by carsonb at 6:45 PM on June 26, 2012




I think it's maybe it's a narrower issue than I assumed, and only because I had an <a> tag closed with an </i> and then a complete proper pair of <i> </i> later in the same comment.

Hooray, thanks for correcting the original comment as well!
posted by Bokononist at 6:49 PM on June 26, 2012


Also, hey, 'blows up' is not exactly the best descriptor to use when reporting stuff like this. Use your words to describe how what happened deviated from your expectations.
posted by carsonb at 6:49 PM on June 26, 2012


And hey man, the html in your profile is muffed.
posted by carsonb at 6:50 PM on June 26, 2012


newopenmetatalkthreadnewopenmetatalkthreadnewopenmetatalkthreadwheeeeeee
posted by carsonb at 6:51 PM on June 26, 2012 [4 favorites]


Today I had a problem with a less-than. Let me try it now...

(<- like this, wouldn't preview or post)

Huh, works now.
posted by DU at 6:57 PM on June 26, 2012


I don't see what you did there.
posted by Effigy2000 at 7:08 PM on June 26, 2012


Today I had a problem with a less-than

Probably happens if you're using it next to tags, maybe?
posted by shakespeherian at 7:09 PM on June 26, 2012


Yeah the less-than greater-than stuff is pesky because it works on Live Preview but once you hit the "real" preview button you've literalized the escape codes [am I using these words properly?] and then it will fail when you hit post. Cruel trick. I fixed the error in your comment. pb will be along at some point to lt you know if this is something we can easily fix [Live Preview is a kludge at some level] or whether you'll just have to use real preview to check your work.

carsonb, do you need some cocoa or something?
posted by jessamyn (staff) at 7:09 PM on June 26, 2012 [1 favorite]


carsonb needs something to make geeky spreadsheets about, pronto.
posted by shakespeherian at 7:12 PM on June 26, 2012


I think the cocoa tag is like the opposite of the blink tag.
posted by hermitosis at 7:13 PM on June 26, 2012


ovaltine!
posted by elizardbits at 7:14 PM on June 26, 2012


Why not roundtine?
posted by cmoj at 7:18 PM on June 26, 2012 [1 favorite]


I mean, the can is round. The glass is round. What's the deal with that?
posted by cmoj at 7:20 PM on June 26, 2012


That's gold, Jerry.
posted by shakespeherian at 7:21 PM on June 26, 2012 [4 favorites]


I wouldn't say no to cocoa.

And yes I do need someone to step up and either help me support my favorite author in res so he continues to write kick-ass CYOA/spreadsheet-able fiction or start doing it in his stead. It is not a thankless job for those who are interested in the latter option, but thanks only go so far apparently.
posted by carsonb at 7:21 PM on June 26, 2012


Is it OK now for me to say "Dammit MattMangels, we had a streak going!"

Because dammit MattMangels, we had a streak going!
posted by Scientist at 7:21 PM on June 26, 2012 [6 favorites]


IANAHTMLExpert, but I thought you had to pair tags. Is it now the case where you can close multiple tags with a single </X, where X = first tag in sequence? (Second tag delimiter left off deliberately.)
posted by Fferret at 7:24 PM on June 26, 2012


Apropos of nothing, I just started listening to Jon Brion's version of Fiona Apple's Extraordinary Machine for the first time in probably six years and it is like the aural version of cocoa.
posted by shakespeherian at 7:24 PM on June 26, 2012


I like Cola Cao far better than Ovaltine tbh.
posted by elizardbits at 7:26 PM on June 26, 2012


I know! I was hoping to get a charity some lovin'.
posted by maryr at 7:26 PM on June 26, 2012


I think the page is written so as to close all open tags - even an empty link will redirect to the page it is on.
posted by the man of twists and turns at 7:26 PM on June 26, 2012


Yeah, mismatched HTML is very tricky. We don't have a way to communicate with people while they're composing a comment. There's no method of saying, "hey, you might have some mismatched HTML." So our HTML-checking code just tries to tidy things up the best it can when you click Post Comment. And Live Preview just tries to approximate what our HTML-checking code will do once you click Post Comment. It won't change a <i> to an <a>. It's not smart enough to figure out what you mean. It will just say, "no closing <a>, add one."

The difference is that Live Preview puts the closing </a> directly after the closing </i> and the server-side code puts the closing </a> at the end of the entire comment. I'll take a look at that and see if I can get Live Preview to match the full check a little more closely. They're two different beasts with different hassles, so it might just be a bug we live with.

...you've literalized the escape codes...

I don't think that's happening. If I type in &lt; it works fine in the HTML preview and stays the way it should in the textarea. We had a problem with that at one time, but it should be working now. I've full-Previewed this comment that's filled with HTML entities several times and it's checking out. I don't have to change anything on preview.
posted by pb (staff) at 7:26 PM on June 26, 2012


Hrm. A tough call. Let me think... Nope, Fox's U-Bet is still the best, hands down
posted by Fferret at 7:27 PM on June 26, 2012


Nope, Fox's U-Bet is still the best, hands down

I disagree
posted by the man of twists and turns at 7:30 PM on June 26, 2012


I stand corrected and will use more > and < from here on out!
posted by jessamyn (staff) at 7:37 PM on June 26, 2012


Oh sure, be a purist! I bet you milk the cow yourself, and travel to Siberia for the salt! Do you also cut and juice you own sugar cane? This must take months, to say nothing of the airfare!
posted by Fferret at 7:51 PM on June 26, 2012 [1 favorite]


Maybe he's a supervillain.
posted by shakespeherian at 7:52 PM on June 26, 2012


Oh sure, be a purist! I bet you milk the cow yourself, and travel to Siberia for the salt! Do you also cut and juice you own sugar cane? This must take months, to say nothing of the airfare!

Airfare, schmairfare. Grow your own wings or go home, that's what we say.
posted by .kobayashi. at 7:55 PM on June 26, 2012


Ahh thanks jessamyn, the timing with comments in here was such I assumed carsonb was an uncredited mod or something and had fixed it for me. It seems like this is all pretty well understood at this point, so this probably isn't necessary but to clarify 1) It's only Live Preview, not "normal" Preview, 2) The HTML is malformed so it's a real curveball, I'd guess ideal behavior would be for the Live Preview text to look like the comment will look upon posting, the actual behavior is for the two to be different with Live Preview being "corrected" and actual Post Comment not inserting a closing </a> tag until the end of the comment. I'm sure not complaining, MetaFilter is awesome thanks for everyone's work on it *hugs*
posted by Bokononist at 7:58 PM on June 26, 2012


There are no uncredited mods. If you'd like a mod response directly to something like this, use the contact form. MetaTalk is for discussion of site issues with the general membership.
posted by carsonb at 8:00 PM on June 26, 2012


Scientist writes "Is it OK now for me to say 'Dammit MattMangels, we had a streak going!'"

taz closing that thread probably saved MattMangels life.
posted by Mitheral at 8:16 PM on June 26, 2012 [7 favorites]


huh?
posted by cjorgensen at 8:45 PM on June 26, 2012 [1 favorite]


Do you also cut and juice you own sugar cane?

There is nothing so succulent and sweet as a freshly chopped cane, long fibers dissolving into the mouth, slurping the juice from the weeping end.

Also, sea salt is much better, in my own humble opinion.
posted by the man of twists and turns at 9:04 PM on June 26, 2012 [2 favorites]


Does italics render on other sites? I know Opera Mini doesn't support italics, for example. It might be a design decision they made for smaller screens.

The text size thing sounds like a Chrome bug. We don't change the text size on orientation change.
posted by pb (staff) at 9:04 PM on June 26, 2012


testy mctesterson
posted by dunkadunc at 9:11 PM on June 26, 2012


I think it's the crazy tags being tested out here, but the text and graphics on this page aren't being properly autosized on my phone (blackberry pearl).
posted by littlesq at 9:21 PM on June 26, 2012


Seeing as we are already chasing down tiny bugs, why do all the links to user profiles show as 'followed' links in the Recent Activity page?
posted by dg at 9:43 PM on June 26, 2012


PSA: if you want < and >, you should use &lt; and &gt; - and you can trust Preview much more than Live Preview.
posted by Pronoiac at 9:44 PM on June 26, 2012 [2 favorites]


Thank you, Pronoiac. That answers a question I've had for some time but have been too lazy and forgetful to research on my own.

Also: no one really likes Ovaltine. I mean, it's what you drink when you're out of the good cocoa but you want a hot beverage and it's too late for coffee. Which is weird, now that I think about it. I don't think I've ever purchased Ovaltine, yet there is a canister of it in my cupboard. Maybe it came with the house.
posted by BitterOldPunk at 9:50 PM on June 26, 2012 [2 favorites]


...why do all the links to user profiles show as 'followed' links in the Recent Activity page?

Feature! It's not the visited color, it's a separate third color. The page was designed that way before my time, but I believe it's because the username and time are right next to each other. So instead of having what looks like one long link, they're different colors to differentiate them.
posted by pb (staff) at 9:58 PM on June 26, 2012


The trick with Ovaltine is to put about thirty times the recommended amount in.
posted by Confess, Fletch at 10:00 PM on June 26, 2012 [2 favorites]


pb: " It's not the visited colour, it's a separate third colour."

Heh, so it is. Kind of an odd solution, but I guess it does the job. When the user link is a visited one, I can't tell the difference though.
posted by dg at 10:12 PM on June 26, 2012


Yeah, it's set to one color.
posted by pb (staff) at 10:17 PM on June 26, 2012


"The trick with Ovaltine is to put about thirty times the recommended amount in."

When I was a kid I used to do that with Nesquik - almost half of the glass would be powder. I haven't had a Nesquik in years, but I still remember milk bubbles that would pop to reveal dry chocolaty goodness underneath. Kinda like a pixie stick in drink form.
posted by littlesq at 10:29 PM on June 26, 2012 [2 favorites]


A chocolate pixie stick. Glad to know I'm not the only one.

Also, I used to eat a spoonful of malt powder every now and then... Yum!
posted by Night_owl at 10:43 PM on June 26, 2012 [1 favorite]


`>_<`
posted by not_on_display at 11:20 PM on June 26, 2012 [1 favorite]


"I don't think that's happening. If I type in &lt; it works fine in the HTML preview and stays the way it should in the textarea. We had a problem with that at one time, but it should be working now. I've full-Previewed this comment that's filled with HTML entities several times and it's checking out. I don't have to change anything on preview."

Yeah, I was going to say that I use entities all the time (especially &mdash;, as you can tell when I occasionally make a typo in its name — I'm not sure why I switched to the entity from unicode) and I don't recall ever seeing that behavior.

Because I always use the true preview facility. I barely look at the live preview, actually. Cortex wrote sometime back that only a tiny, tiny portion of users (less than 1% or something) ever use true preview, which surprised me quite a bit.

You don't explain this, but it's worth mentioning to others that live preview happens in the user's browser and can only be implemented in the tools the browser makes available while, in contrast, true preview happens at the MetaFilter server, any parsing of the entered text for tags and such that occurs will use whatever tools the server environment makes available to the developer, and it can (and should) simply give the user back what will actually go to the database and be a real comment.

In other words, a) live preview is an attempt to recreate in the browser the effects of the processing that will happen server-side using tools that are necessarily different from server side — so, not only is it entirely independent, it's usually not even possible to accomplish except approximately; and, b) true preview can and should be showing the user exactly what will really happen to their submitted data, it's just the same except it omits only actually making it a real comment/post1. So true preview is much, much more reliable than live preview.

1. Well, you have the problem of giving the user back a form with a filled textbox that is exactly what they entered...and that's not trivial, though I think it should be.
posted by Ivan Fyodorovich at 11:22 PM on June 26, 2012


test

Yo momma stupid fat.


test
posted by special-k at 11:31 PM on June 26, 2012


pb: Yo website broken, mon.
posted by special-k at 11:32 PM on June 26, 2012


dov'รจ quel buono a nulla mathowie, eh?
posted by special-k at 11:33 PM on June 26, 2012


One of my favorite bartenders used to make "Ovaltinis". They were surprisingly good.
posted by brundlefly at 11:52 PM on June 26, 2012


There is nothing so succulent and sweet as a freshly chopped cane, long fibers dissolving into the mouth, slurping the juice from the weeping end.

The long fibres absolutely do not dissolve in your mouth. Chewing sugar cane is indeed very pleasant, but it's chewing cane, not eating, precisely because of how tough the fibrous sugar cane is. Involves a lot of spitting out of what feel like errant bits of wood in your mouth, in my experience. Very sweet and juicy, though.
posted by Dysk at 1:51 AM on June 27, 2012 [3 favorites]


I can't wait to get home and my wife if she wouldn't mind literalizing my escape codes.
posted by The Deej at 5:04 AM on June 27, 2012

[...] it's worth mentioning to others that live preview happens in the user's browser and can only be implemented in the tools the browser makes available while, in contrast, true preview happens at the MetaFilter server, any parsing of the entered text for tags and such that occurs will use whatever tools the server environment makes available to the developer, and it can (and should) simply give the user back what will actually go to the database and be a real comment.
Aaaaaaahhhh *lightbulb has gone on*

Henceforth, I hope to never again need the HTML error flag on my own comments :) Thanks to those who've given this explanation, I'd wondered what the reason was behind so many live-preview comments whose HTML appeared differently after posting. Yep, never used true preview, woops.

*clicks on Preview*

oooooh, shiny.
posted by fraula at 5:14 AM on June 27, 2012 [1 favorite]


I haven't had a Nesquik in years

You should correct that, although I would err on the side of less powder. But a cold glass of Nesquik after a hot summer run is one of the joys of the world!
posted by OmieWise at 5:20 AM on June 27, 2012


Yeah the less-than greater-than stuff is pesky because it works on Live Preview but once you hit the "real" preview button you've literalized the escape codes [am I using these words properly?] and then it will fail when you hit post.

Yeah, I know about that one. This was different. I got some kind of "cannot post comment" message and my Post button grayed out. Same with the Preview when I tried that. I thought maybe the post had been deleted out from under me, but no.

But unless you can figure it out from that, don't spend any time worrying about it. I'll try to gather more info if it ever happens again.
posted by DU at 5:25 AM on June 27, 2012


Pronoiac: "PSA: if you want < and >, you should use &lt; and &gt; - and you can trust Preview much more than Live Preview."

Or you could like, stop with the value judgements, man.
posted by Splunge at 5:47 AM on June 27, 2012 [2 favorites]


Value judgements < no value judgements
posted by SpiffyRob at 6:10 AM on June 27, 2012


judgements &gt judgments.
posted by mediareport at 6:18 AM on June 27, 2012 [1 favorite]


Oops.
posted by mediareport at 6:18 AM on June 27, 2012 [1 favorite]


Hold that thought.
posted by y2karl at 7:13 AM on June 27, 2012


Ovaltine always reminds me of my grandmother. And boiled hamburger. And pressure-cooked broccoli.

Avna was not the greatest cook, rest her soul.
posted by ook at 7:14 AM on June 27, 2012


Strawberry Nesquik rocks. Ovaltine is nice sometimes, too.
posted by jonmc at 7:41 AM on June 27, 2012


I got some kind of "cannot post comment" message...

I can't think of what this could be offhand unless you were impersonating a byline. That and commenting on a deleted thread are only times we stop the comment process and show an error message. If it happens again, just grab the exact text of the error message and send it to me via MeFi Mail. I can take a look from there.
posted by pb (staff) at 8:02 AM on June 27, 2012


Huh. You stop the comment process with a byline impersonation. When did this start? I think it's a good thing, because when I first started reading MetaTalk, I remember being confused by people who would do this.
posted by Night_owl at 8:25 AM on June 27, 2012


Night_owl: "You stop the comment process with a byline impersonation. When did this start?"

This is one of my favorite little things about MetaFilter. I was once trying to make a joke about byline icons, and I had a devil of a time figuring out what was wrong with my comment. I got around it by intentionally misspelling "posted", which I don't think is really noticeable and certainly didn't mar my little goof in the way that normal size text would have.
posted by Rock Steady at 8:35 AM on June 27, 2012


When did this start?

It's been that way for a long, long time. Before my time, I think.
posted by pb (staff) at 8:44 AM on June 27, 2012


Yeah, years and years. It's a bit of a dinosaur of an exception case now, but it's in there.
posted by cortex (staff) at 8:46 AM on June 27, 2012


did anyone else read this post title as "Bug Life" at first, and think it was a pretty awesome Tupac reference?
posted by shmegegge at 8:49 AM on June 27, 2012


no? ok then.
posted by shmegegge at 8:49 AM on June 27, 2012 [1 favorite]


I don't think I've ever had Ovaltine...

And it's never too late in the day for coffee.
posted by patheral at 9:33 AM on June 27, 2012


Metafilter: We've literalized the escape codes
posted by tommasz at 9:37 AM on June 27, 2012


Aside from user convenience, is the main purpose of the instant preview to conserve server load and bandwidth? How much would the userbase hate having no live preview, a mandatory preview as the only button that creates a true preview with a huge button that says: "Post Comment (WARNING: THERE IS NO 5 MINUTE EDIT WINDOW!!!)"?
posted by double block and bleed at 11:40 AM on June 27, 2012


That's not a serious suggestion. Put away your torches and pitchforks, friends, and leave in peace
posted by double block and bleed at 11:42 AM on June 27, 2012


Don't do it, then.
posted by Decani at 11:56 AM on June 27, 2012


a mandatory preview as the only button that creates a true preview

That's how it used to be and lots of people hated it or at least much prefer the current setup.
posted by Mitheral at 1:27 PM on June 27, 2012


« Older Everything alright?   |   Erdos-Bacon-Sabbath-timeblimp Newer »

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