{"id":2788,"date":"2010-03-07T01:54:30","date_gmt":"2010-03-07T05:54:30","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/?p=2788"},"modified":"2010-03-07T01:54:30","modified_gmt":"2010-03-07T05:54:30","slug":"cleaning-up-posts","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2010\/03\/07\/cleaning-up-posts\/","title":{"rendered":"Cleaning Up Posts"},"content":{"rendered":"<p>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&#8217;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&#8217;t, for example, embed an iframe with Javascript to expand it to 100% width and height, as spammers have done in the past.<\/p>\n<p>It&#8217;s very tempting for me to write a few filters though:<\/p>\n<ul>\n    <li>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&#8217;s tempting to replace <b> with <small> if they encompass the whole post.)<\/li>\n    <li>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&#8217;s normal.<\/li>\n    <li>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.<\/li>\n<\/ul>\n<p>I forget where it was, maybe Yahoo, but they have a little bit of JavaScript that displays a netiquette &#8216;warning&#8217; if it sees you typing in all caps. That should be a standard feature.<\/p>","protected":false},"excerpt":{"rendered":"<p>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&#8217;t screw up formatting for the rest of the page. They tend to restrict what &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2010\/03\/07\/cleaning-up-posts\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2788","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/2788","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=2788"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/2788\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=2788"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=2788"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=2788"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}