dionidium.com

Wayne Burkett's Weblog | Home

Commenting Enabled
08:49PM CST May 30, 2004 | Comments [11]

I've finally hacked support for comments into my home-grown CMS. Following Simon Willison's lead, comments here are run through an XML parser to first check for well-formedness, then to ensure only selected elements and attributes are used.

I've opened comments on the two most recent entries to start. Let me know if you run into any problems posting, or if you think any of the error messages could be made more clear.

#1 | 03:35AM UTC May 31, 2004 | Wayne
Wayne

Here's a quick test of the allowed elements. There's a link in this sentence.

  • A list
  • Item 2
  1. An ordered list
  2. Item 2

Some emphasized text. Strong text.

Some code: #!/usr/bin/perl

A citation: Bill Gates. This site uses CSS.

I have gathered a posie of other men's flowers, and nothing but the thread that binds them is mine own.

#2 | 04:54AM UTC May 31, 2004 | Simon Jessey
Simon Jessey

Well it appears to work rather well. I intend to do the same thing on a future si-blog, after I've figured out how to get mod_rewrite to work properly!

Will my details be cookified?

#3 | 10:26AM UTC May 31, 2004 | Wayne
Wayne

This is just another boring test comment.

#4 | 04:03PM UTC May 31, 2004 | Mike P.
Mike P.

Hey there. We use Simon's code on our blog and have found that url's with unescaped ampersand's fail, but the error message doesn't give much for advice.

So I've included the following help: "The validator will reject unescaped ampersands (including those in urls), however it won't provide a warning message, it will simply state "XHTML is not well-formed"."

#5 | 11:14PM UTC May 31, 2004 | Wayne
Wayne

Good point, Mike. I've hacked in a clearer message for comments that fail the parser's well-formedness check:

Your comment is not well-formed. You must close all open tags. Unescaped ampersands and "smart" quotes will also fail. You must always encode ampersands, even in URLs.

#6 | 02:15PM UTC June 28, 2004 | Wayne
Wayne
Testing comment Iñtërnâtiônàlizætiøn.
#7 | 01:38AM UTC August 17, 2004 | Wayne
Wayne

There was a bug that allowed javascript in the name field. Sorry to any of you exposed to the earth-shatteringly disgusting pictures to which at least one unscrupulous visitor was able to forward some visitors to this site.

Unless, uh, you were into that sort of thing.

#8 | 05:21AM UTC August 24, 2004 | Wayne
Wayne
Testing some changes to the script.
#9 | 06:51PM UTC August 25, 2004 | Wayne
Wayne

Individual entry archive pages are now dynamically generated. This is a test.

#10 | 07:28AM UTC November 23, 2004 | Wayne
Wayne
Test. Only a test.
#11 | 12:16PM UTC January 11, 2005 | Wayne
Wayne
Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test