Site Updates for 06/06 Posted June 6, 2004 at 9:28 pm

The time has come! I’ve finally transitioned the site to XHTML. After toiling over the blog entries for the better part of the last two days, all 252 entries validated for XHTML 1.0 Strict; it was a rather arduous process.

I started with a bunch of regular expressions to supplant HTML markup with Wiki markup. This took care of the bulk of the work. I finished the rest by hand (fixing inconsistencies and grammar along the way).

Perhaps the biggest hurdle involved special HTML entities like the em dash and the ellipsis. TextWiki inexplicably spat out these entities as plain text and I feared some unforeseen incompatibility. After some research and a little trial and error, I discovered that the problem, in fact, lie not with TextWiki but with PHP’s htmlentities() function, which apparently fails to include a lot of the higher ASCII characters. I was able to resolve the issue by writing my own simple function to restore these special entities after TextWiki and htmlentities() have run their course.

I also had to disable TextWiki’s anchor targets (e.g. target="_blank") to validate as XHTML 1.0 Strict. I don’t typically use the target attribute anyway and I was slightly irked that TextWiki took it upon itself to insert one. I couldn’t figure out how to disable the rule with TextWiki’s disableRule() so I just disabled it manually using:

unset($wiki->rules['url']['conf']['target']);

I’m still having issues with character set encoding that need to be resolved. The problem lies with child directories not inheriting the proper php.ini file. (Every since my hosting installed suEXEC it’s been all screwed up.) I’ll continuing working on this and any unresolved validation errors over the next few days.


Comments for This Entry Here's what others have said about this entry.

There are no comments for this entry.

Leave a Comment You may post a reply to this article.