HTML Error with small tag? December 16, 2009 4:31 PM   Subscribe

HTML error? Using a "<" sign inside small tags seems to have done it.

Over here, in the preview area, my comment worked fine, but did not do so well once posted. I wanted to make a <><> (without the dots of course.)
posted by battlebison to Bugs at 4:31 PM (17 comments total) 1 user marked this as a favorite

Alright, I'm about to give up as this is obviously my ineptitude ruining things. This post previewed just fine for me! (Firefox browser, newest version if that makes a difference.) I will use X's as greater-than (pointy side goes left) signs, Y's as less-thans:
XsmallY X-- blahblah X/smallY
posted by battlebison at 4:33 PM on December 16, 2009


Looks like it didn't work here either. Sorry about the hassle, but that's the hazard with posting HTML. If you use a greater than or less than sign somewhere in your comment, the system is going assume that you're trying to write HTML. So if you have an unclosed tag, it's going to do the best it can to close it for you.

The Live Preview is only an approximation of what you'll get, and if you're doing anything fancy with HTML you should use the "Preview" button. We have a FAQ entry about this here, and we link to the HTML FAQs next to every comment form—the little "HTML help" link.
posted by pb (staff) at 4:36 PM on December 16, 2009


In the future, if you want to use a greater than or less than sign in a post or comment and you don't want it to be part of an HTML tag, you can use the HTML entity like so: < = &lt; and > = &gt;. So the exact text you would type into the box for your comment would be: <small> &gt;--blahblah </small>.
posted by pb (staff) at 4:39 PM on December 16, 2009 [1 favorite]


Cool! Thanks, pb! That pretty much solves my problem.
posted by battlebison at 4:55 PM on December 16, 2009


Yay! This is written in the FAQ in some approximation too so you can look up "html" there for a refresher.
posted by jessamyn (staff) at 5:44 PM on December 16, 2009


I want some sort of law that says by 2030, the live preview will use ajax to have the server side scripting that does the regular rendering return the exact same thing it'd otherwise return on Preview, instead of the javascript pretendulation.
posted by floam at 6:06 PM on December 16, 2009


Prepare for a fillibuster, floam.
posted by subbes at 6:23 PM on December 16, 2009


Fill out your request in triplicate, floam.
posted by jessamyn (staff) at 7:22 PM on December 16, 2009


The issue is that running that server-side HTML validation code on every keypress would be ridiculously slow. The first A in Ajax stands for asynchronous and the live preview as it is now is synchronous. Having to wait around for the parser is what you get when click the Preview button. Oh well, maybe by 2030 we'll all have fully functioning HTML parsers standard on our neural implants and this won't be an issue.
posted by pb (staff) at 7:42 PM on December 16, 2009


Maybe it could work with a Differentiating Parser?
posted by Monday, stony Monday at 9:02 PM on December 16, 2009


Or just occasionally have the server render the input, but between real-daels do incremental guessing using the javascript. Maybe re-parse every time something that should affect the actual structure occurs, but not when what would be some more text added to a paragraph node.
posted by floam at 9:57 PM on December 16, 2009


But of course that's not nearly as easy as the fifteen minute hack I envisioned to just use all the existing code to spit stuff out via Ajax. Maybe we can delay this to 2050. Anyways, nobody's even done an environmental impact study yet.
posted by floam at 9:59 PM on December 16, 2009


Or take away the live preview and only leave the preview. Then you could force everyone to preview before posting and watch the rage ensure. (or not).

Or maybe just a note somewhere the preview isn't perfect then you can point to that somewhere for explanation. (and yes I'm too drunklazy to go see if it's in the FAQ).

(isn't it weird how some people say eff aye cue like it's an actual work (fack)?).
posted by shelleycat at 11:26 PM on December 16, 2009


<cough>WMD</cough>
posted by blue_beetle at 6:01 AM on December 17, 2009 [1 favorite]


This is a solved problem. Metafilter doesn't need to hand-code its own text editor, dudes and dudettes.
posted by blue_beetle at 6:04 AM on December 17, 2009


What's weird is when they mispronounce it, so it sounds like "fact".
posted by owtytrof at 8:50 AM on December 17, 2009


Thanks for the suggestion blue_beetle. I'm afraid the switch from HTML to Markdown would be a huge cultural shift for the site. Not a big deal if you're already comfortable with both, but I think we'd need to take on the task of teaching everyone Markdown—what it looks like in the textarea, and how it's similar to and different from HTML. It wouldn't be a smooth transition, and I'm not sure the pain would offset the occasional munged greater than sign.
posted by pb (staff) at 9:42 AM on December 17, 2009 [1 favorite]


« Older Duckface = bad and Upside Down Smiles = Good?   |   Asking complex, multi-part questions on AskMe? Newer »

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