Still working on this, but I think I have it nailed. I'll be posting a bunch of minor fixes and tweaks this weekend at some point, so it'll go up then.
Also, I'm adding some logic to the processing so that HTML created by forum tags or the editor isn't counted toward your signature character limit. Since a lot of HTML can be necessary for a few simple things, but that source code isn't visible to end users, I don't think it makes sense that the source code be included in the character count.