Cleaning Up Posts

In: Uncategorized

7 Mar 2010

Most sites that allow HTML have some sort of sanitizer in place, so that when someone forgets to close a tag in a post, they can’t screw up formatting for the rest of the page. They tend to restrict what you can post to a reasonable set of tags, so that you can’t, for example, embed an iframe with Javascript to expand it to 100% width and height, as spammers have done in the past.

It’s very tempting for me to write a few filters though:

  • If the entire post is bold, remove the tags. Posting your reply in bold in the middle of a discussion is really pretty obnoxious. (As a passive-aggressive person, it’s tempting to replace <b> with <small> if they encompass the whole post.)
  • If the post is more than 8 characters and is entirely in uppercase, downcase the entire thing. It amazes me how many people just write in all caps as if it’s normal.
  • If a post is more than 50 characters and is entirely in lowercase, sentence-case it. This assumes that they used punctuation at all while disregarding capitalization, though.

I forget where it was, maybe Yahoo, but they have a little bit of JavaScript that displays a netiquette ‘warning’ if it sees you typing in all caps. That should be a standard feature.

Related posts:

  1. Micro-posts
  2. Posts
  3. Passwords
  4. Now with Tracking Goodness
  5. Password Requirements

Comment Form

On Other Sites

  • i5junkies: Thanks for this posting. It helped me fix the problem and running. GREAT post!!! [...]
  • emeka: i accidentally unscred all the screws and flipped my laptop now i dont know which screw goes where p [...]
  • Erik: Hey Matt! I came across your blog after seeing you had posted a link to our older website. I know t [...]
  • mot: haha - thats all i could say... thanks [...]
  • Motorola Phones - The RadioReference.com Forums: [...] Have a look at this page: Direct Talk Compatible Phones | Matt's Blog [...] [...]