OkCupid auto-close markup tag

By Cornelius Last update Feb 19, 2008 — Installed 246 times.

Script Summary: Automatically closes any unclosed markup tags on submission.



Only looks at those allowed by OKCupid (bold, italics).

Also, it doesn't magically know where you *meant* to close - it just adds enough closing tags to match the number of opening tags you entered. This means that it can't fix your post if you broke it, but subsequent comments will not be harmed by your typo or omission.

TODO: 1) add something to look for common mispelins of the closing tags; 2) deal with the tags as an array instead of hard-coding them.

Thanks to Johan Sundström (http://userscripts.org/users/326) for assistance.
You might check out his collection of scripts, and in addition, there's http://zzyzx.xyzzy.googlepages.com/okcupidhacks