Are HTML entities allowed? September 21, 2006 1:22 AM   Subscribe

Quick question about HTML entities: are they no longer accepted in comments? I've been trying to use em-dashes like so: [ampersand] [pound sign] 8212 [semi-colon] and this has worked fine until recently. But lately, I've left a trail of comments with ugly "8212;"s all over the place, as if the [ampersand] and [pound sign] were stripped off before post (but after the inline preview).
posted by chrominance to Bugs at 1:22 AM (32 comments total) 2 users marked this as a favorite

testing:

I think — works. — Yep. (in preview, anyway)
posted by taz at 1:48 AM on September 21, 2006


&mdash
posted by davehat at 1:50 AM on September 21, 2006


heh. Well that first em dash was supposed to be ampersand folowed by "mdash" concluding with a semicolon.
posted by taz at 1:50 AM on September 21, 2006


yes, exactly, davehat, with the semicolon at the end.
posted by taz at 1:53 AM on September 21, 2006


with semicolon:



without the semicolon:

&mdash
posted by davehat at 1:54 AM on September 21, 2006


Heh, preview is not your friend when trying to help with this...
posted by davehat at 1:55 AM on September 21, 2006


yes, it's weird. After posting, it translates ampersand/amp/semicolon followed by mdash/semicolon as a straight dash, though in preview it shows it correctly. Poop.

Let me try that again... —
posted by taz at 2:02 AM on September 21, 2006


huh. Me confused. It worked that time. I'm just going to pull in my mdash and shuffle off to ampersand. Leave my semicolon out of it.
posted by taz at 2:03 AM on September 21, 2006


It's the non-live preview that'll break it. F'rexample:



I pressed 'preview' before posting this.
posted by Plutor at 3:31 AM on September 21, 2006


I knew that was going to happen.
posted by Plutor at 3:31 AM on September 21, 2006


This is why the content of <textarea> tags needs to be HTML-escaped. It would solve all this preview-breaking-stuff malarkey.
posted by chrismear at 4:12 AM on September 21, 2006


The real baffling thing here is, how many of the — above are supposed to be — and how many of the — are supposed to be —.

This comment looks OK in preview. Now, lets press the "Do Voodoo" "Post Comment" button and see what we get....
posted by davehat at 4:43 AM on September 21, 2006


Classic.
posted by davehat at 4:43 AM on September 21, 2006


What?
posted by OmieWise at 5:56 AM on September 21, 2006


Heh. The all look like — em dashes to me. (Option+Apple+-)
posted by klangklangston at 6:18 AM on September 21, 2006


What?

The insight was obviously devoured by live preview.
posted by peacay at 6:32 AM on September 21, 2006


What klangklangston said: just type the emdash character, and don't bother with entity encoding. That will work just fine in every browser that can correctly display UTF-8.

The only entities that are required to be escaped in XHTML are < (&lt;) and & (&amp;).

(Yes, > is a valid character and is not required to be escaped.)
posted by ijoshua at 6:45 AM on September 21, 2006


(Although, it’s option–shift–-)
posted by ijoshua at 6:47 AM on September 21, 2006


187;♥171;
(Should it work, this comment contains both numbered and and mend entities.)

posted by If I Had An Anus at 6:51 AM on September 21, 2006


Weird, it, uh, also chenges 'named' to 'mend'! =)
posted by If I Had An Anus at 6:51 AM on September 21, 2006


ijoshua writes "(Yes, > is a valid character and is not required to be escaped.)"

Becareful though because the validator will strip a / followed by a > I think. Let's see: />
posted by Mitheral at 7:07 AM on September 21, 2006


Nope, guess it's ok.
posted by Mitheral at 7:07 AM on September 21, 2006


QWERTY QWERTIE
posted by thatweirdguy2 at 7:09 AM on September 21, 2006


entity encoding was removed when someone showed me some really easy hacks you could use it to do. It was possible to entity encode all sorts of nasty remote scripting stuff.

If you want an emdash, just copy and paste the character in or do the ampersand-mdash-semicolon, don't use the character entity.
posted by mathowie (staff) at 7:21 AM on September 21, 2006


Does this by chance have anything to do with why the spell-check link is gone (OS X 10.4.7 and Firefox 1.0.7)?
posted by sourwookie at 7:47 AM on September 21, 2006


Ignore my above comment, I did some poking around.
posted by sourwookie at 7:48 AM on September 21, 2006


&emdash; works fine, use that.
posted by delmoi at 2:26 PM on September 21, 2006


oops mdash, I mean.
posted by delmoi at 2:26 PM on September 21, 2006


I, in my obvious authority, declare this thread closed!
posted by Alvy Ampersand at 4:42 PM on September 21, 2006


This is what happens when I forget to check back on Metatalk8212;lots of people post, the problem appears solved, and I have no idea if it actually is or not—at least, until I publish this post.

(first entity 8212, second entity mdash, both appear fine in live preview, 8212 screws up on pressing the preview button... what. the. correcting...)
posted by chrominance at 9:43 PM on September 24, 2006


Hmm. &mdash; it is. Thanks delmoi!
posted by chrominance at 9:43 PM on September 24, 2006


Thanks delmoi?
posted by davehat at 2:43 AM on October 17, 2006


« Older Missing Spell Check   |   Headlines cause confusion Newer »

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