Well Formed Comments
My comment system is based on a number of regular expressions which seem to work tolerably well in most instances when coupled with a preview function. Unfortunately, the results are not quite as good when used in a API context. So, today, I finally did something about it.
The way it works is as follows:
- If your content is marked as well formed XML (either xhtml:body or atom:content[@mode='xml']), then a simple scan is done for objectionable tags. If there are any such tags, the entire request is rejected. Otherwise, the request is posted as is.
- If all I find is escaped content, I'll continue to support that as I always have - with the regular expressions that mostly work. Kinda.