Talk To Me

Volume 7, Issue 161; 09 Sep 2004; last modified 08 Oct 2010

This evening I installed some new code for handling comments. The significant new features are the ability to put HTML elements (a few of them, anyway) in your comments and the ability to subscribe to the comments on a particular essay.

Being forced to write comments actually improves code, because it is easier to fix a crock than to explain it.

G. Steele

This evening I installed some new code for handling comments. The significant new features are the ability to put HTML elements (a few of them, anyway) in your comments and the ability to subscribe to the comments on a particular essay. Internally, the comments are now stored as Atom entries, so it’s easy to publish them as a feed.

HTML support relies on John Cowan’s TagSoup to clean up the…tag soup that users enter into the comment form. While I was waiting for John to fix a couple of bugs that I tripped over, I made a half-hearted attempt to implement a simplified version in Perl. I have new appreciation for the difficulty of the task. Thank you, John!

On the subject of subscribing to comments, it’s not entirely clear to me how useful that really is. Comments tend to die off pretty quickly, so I doubt that it’s going to be very interesting over the long haul. It’s also not clear how much load it’s going to put on my little server. But it’s a new feature!

A few notes:

  • You can now use a cookie to remember your name, email address, and homepage.

  • Your email address is not displayed online or the comment feed. Please provide your real, legitimate email address. I do put the SHA1 checksum of the email address in the Atom feed, as a foaf:mbox_sha1sum, so it is possible to determine indirectly who wrote a comment. (If you provide a real email address.)

  • You have to preview a comment before you can submit it. This allows you to see what happened to your tags.

  • Character entities (either HTML named character entities or numeric character references) seem to work.

  • Only a few block and inline HTML elements are allowed. If you feel I’ve overlooked an element you need, just let me know. No attributes are allowed.

Give it a whirl and let me know what you think.

[Update 10 Sep 2004] Yesterday, as I was writing this, I realized I’d broken the “view all the comments on this site” function. Or rather, I hadn’t yet updated it to support the new comment format. That’s fixed now, and there’s a new URI for them: http://norman.walsh.name/atom/comments.xml.

Comments

Testing the nifty new HTML comment facility (and carefully not stepping on the secret bugs in TagSoup that only I know of.

Bold, bold italic, italic, plain.

grinning like a thief that this actually works...

—Posted by John Cowan on 10 Sep 2004 @ 04:19 UTC #

Ha, cookies work.

My favorite instance of accents: the French word « hétérogénéité », meaning (surprise!) "heterogeneity". Accents with entities, guillemets directly entered.

—Posted by John Cowan on 10 Sep 2004 @ 04:28 UTC #

Do the apostrophe's work?

—Posted by Norman Walsh (With an 'apostrophe' or two) on 10 Sep 2004 @ 06:43 UTC #

RE: Juliet's balcony, Verona, Italy.

Are you mad?!....Juliet's balcony, tacky?!....I visted Verona last year and found the courtyard to be the most intense place i've ever been. Maybe its because i'm a young woman in love, and your an old man who spends way too much time on his computer?

—Posted by Woman in Love on 12 Aug 2005 @ 06:17 UTC #