Ding Dong, the Wicked Plain Text Reader Comment Field Is Dead
In response to my recent rant about why it's a good idea to give your users the option of working with rich, HTML-driven text rather than boring old depressing plain text, a reader had this to say in the comments:
Hm. Looking at the user interface that I'm typing this comment into, I see:
"Comment: (sorry! no HTML.)"
Pardon me, I just stepped in a small pile of irony.
And it's true: the humble Coding the Wheel reader comment form, with its special mix of plain text sprinkled with poor-man's BBCode sans preview, isn't exactly a testament to expressive UI.

Not that it's a big deal, not that anybody really cares; but if you have a website where people occasionally submit code samples or bulleted lists or images, it makes sense to do two things:
- Let people use some sort of markup (HTML, BBCode, Markdown).
- Let people preview (preferably in real time, on the client side) what their comment/post/thread will look like.
In fact, 1998 just called and it wants its plain-text reader comment form back. So, recalling Jeff Atwood's admonition from A Blog Without Comments Isn't a Blog...
I firmly maintain that a blog without comments enabled is not a blog. It's more like a church pulpit. You preach the word, and the audience passively receives your evangelical message. Straight from God's lips to their ears. When the sermon is over, the audience shuffles out of the church, inspired for another week. And there's definitely no question and answer period afterward.
...and recognizing that allowing people to enter bits and pieces of BBCode is dubious at best, from a usability standpoint, when those people can't see what anything will look like until after they've submitted the comment...publically and irrevocably...

...I went ahead and implemented HTML-and/or-Markdown-driven reader comments with live preview using:
- The StackOverflow fork of the WMD Editor
- Brian Jeremy's revised Markdown.NET library
- No, better make that MarkdownSharp
- The Atwood HTML sanitizer, with additions.
- Beyers Cronje's C# port of Roberto Bicchierai's Java HTML sanitizer
- Microsoft AntiXSS
- Google Prettify
- jQuery
- jQuery Validation
- jQuery Timers
I'm still working out the kinks, but what it means is that you can write a comment using whatever you want.
- plain text
- raw HTML
- Markdown
- or, by using the buttons
And you'll see a WYSIWYG (well, technically a WYSIWYM) preview of the comment as you type. Because in today's web, Thou Shalt Not Use HTML for User Comments is a Commandment that's starting to show its age, and I've never though it was a good message to send people anyway.
Use the form below to leave a comment.
- Of Gravatars and Robohashes
- Optimizing VP$IP
- A Question of VP$IP
- John Carmack: Script Interpreters Considered Harmful
- Movie Doppelgangers: B-Movie Ripoffs of Hollywood Blockbusters
- BROWSE ALL POSTS
Subscribe to Coding the Wheel over email or through any RSS reader. Coding the Wheel has been published since 2008.
- How I Built a Working Online Poker Bot, Part 1, 2, 3, 4, 5, 6, 7, 8
- Summoning the Harry Potter MMORPG
- Are Commercial Databases Worth It?
- 21 and the Monty Hall Paradox
- Online Poker and the Multi-Tabling Effect (34)
talia wrote: Ping G15 Fairway Wood Mizuno MP 53 Irons Mizuno MP 68 Irons Mizuno MX 1000 Irons ... - Online Poker and the Multi-Tabling Effect (34)
talia wrote: Ping G15 Fairway Wood Mizuno MP 53 Irons Mizuno MP 68 Irons Mizuno MX 1000 Irons ... - The Coin Flip: A Fundamentally Unfair Proposition? (92)
carla wrote: great post Thanks for sharing! [mutui][1] [1]: http://www.finmutui.it/ "mutui" ... - Summoning the Harry Potter MMORPG (1593)
AmberTheHarryPotterNumber1Fan wrote: Oh Does anyone know when it will come out? - Full Tilt Color Coding In Twenty Minutes or Less (34)
Timber Decking wrote: [url=http://www.deck-max.com.au/]Timber Decking[/url] [url=http://www.timberdeckingsydney.net.au/]Timber ... - Summoning the Harry Potter MMORPG (1593)
Tekken9 wrote: There is no game, at least not yet. - The Programming Aphorisms of Strunk and White (90)
parkeren wrote: So that we will follow and what shall be the first step to do so, because everyone will like this software ... - Online Poker and the Multi-Tabling Effect (34)
Anonymous wrote: This was an entirely new concept that Titleist Japan & Titleist US worked together on to create. They ... - Summoning the Harry Potter MMORPG (1593)
AmberTheHarryPotterNumber1Fan wrote: How do i play the Game? ;{ - The Coin Flip: A Fundamentally Unfair Proposition? (92)
maria wrote: i like this article and got info.this is very nice and popular site ,it site have informative and intrusting ... - The Coin Flip: A Fundamentally Unfair Proposition? (92)
Brian wrote: This is fascinating. I wonder if there's a similar bias vis a vis the coin flip during a football ... - Movie Doppelgangers: B-Movie Ripoffs of Hollywood Blockbusters (14)
Brian wrote: This is certainly not a hollywood blockbuster [dating site][1] [1]: http://www.basecandy.com/ ... - Movie Doppelgangers: B-Movie Ripoffs of Hollywood Blockbusters (14)
Brian wrote: Singles looking for [dating websites][1] can join now. [1]: http://www.basecandy.com/ ... - Full Tilt Color Coding In Twenty Minutes or Less (34)
Photo booth san diego wrote: Appreciate your making the effort to discuss this, I find myself strongly about this and love mind ... - Of Gravatars and Robohashes (20)
rake wrote: [rake][1] you provide the nice information , gravaters are amazing [1]: http://www.rakebackrage.com/ ... - The Programming Aphorisms of Strunk and White (90)
Steve Waters Vancouver wrote: A random act of kindness! - Movie Doppelgangers: B-Movie Ripoffs of Hollywood Blockbusters (14)
Bradly wrote: Battle: LA was a great movie (the new one that is). I have noticed a lot of very similar movies, mostly ... - Summoning the Harry Potter MMORPG (1593)
Shawn wrote: Haha, these photos are classic! I'm actually not a fan of the Harry Potter movies but I do play ... - A Word About Authenticity (57)
Shawn wrote: Being authentic is very important. If I'm playing poker against a bot and it goes all in on a 2, ... - Coding the Tweet: Building a Custom Branded Twitter Application (71)
Shawn wrote: Using Twitter to promote a business is extremely popular today. I actually found a place to train ...

17 comment(s)
Okay, I'll bite.
I wish like hell they would implement something like this on Blogger. Even if they made it an option, so you didn't have to have it, but u could if you wanted to....
@ XSSor
I think you meant something more like thisBoo-urns! It didn't work. :-/
Is a no go, eh? I suppose you still need to make it safe. Looks a lot better JD, keep up the good work.
Oh noes, I so long for the old plain, or almost plain, text field...
In these times, even nostalgy isn't what it used to be.
<PLAINTEXT>Come on everybody, let's load up the comments with XSS exploits. : )
Lol. By all means.
James I met you out in Vegas a couple years back at the Bellagio. Just wanted to say hello. Like the site, drop me a line sometime (I sent you an email, too).
Love it love it love it. WMD really seems to be catching on.
I love my ghd outlet Glattetang! It heats up very quickly and works well. My glamour hair is annoyingly thick and poofy, but ghdstraighteneroutletaustralia works wonders! I have never been so fully satisfied with just ghd straightener outlet supplier! What a pleasure shopping at this ghd outlet australia! Thank you very much for this wonderful shopping experience. I will be shopping ghd outlet very very often.
ghd rettetang has lasted for a long time, with no proplems. Few hairs are snagged and my hair is left shiny and nice. ghd rettetang til salgsis my PREFERRED brand, and thanks for the best price. I have heard a number of people saying how good ghd glattetang are so when I got the chance to use them I found they were not a patch on my one, so don't be fooled by the name!! I would be recommending the ghd rettetang i norge to everyone and would tell people to try both brands and put them to the test and billig ghd will certainly come out on top. kjøp ghd rettetang is the most amazing ghd there possibly could be.My first choice every time for Totally excellent ghd rettetang !