Blog Courtesy

One of the things that I have noticed in the past few weeks on this site is a serious decrease in what I call “Blog Courtesy”. What is “Blog Courtesy”? It's the consideration that the way your posts look affects other people's blogs. For example, not checking your HTML for extra whitespace at the end of a post is a serious BlogPaux. Another one is the use of non-standard HTML tags in your posts. For example, using tags in your posts, or stray

closing tags. One little stray tag can throw off the whole site, as you can see is happening right now. I'm not naming any names, it's easy to see who the culprits are. Please, just remember that your posts are aggregated onto the main site, and not everyone uses the RSS feeds to read the posts.

ScottW gave me a great tip.... if you need to display HTML tags in your comments, without that nasty “morphing <> error” that pops up with DHTML RichText Box solutions.... use an <XMP></XMP> tag. It's a tag that doesn't format anything that's inside it. I had never heard of it before, bit apparently it works... watch this:

<hello>

Cool, huh?

10 Comments

  • Beautiful! Thanks.

  • Robert: while I dont post on weblogs.asp.net, one of my biggest gripes are the &quot;test post&quot; type of messages.



    I believe that Scott has made the .Text platform available for download, people should download and install this on their own machines to test plugins and what not, rather than bombarding the main page or RSS feed.



    Perhaps you could voice this for me?

  • Regarding Courtesy, Maybe the reason you hadn't heard of the &lt;XMP&gt; tag was because it was obsolete in in HTML 2.0 and Deprecated in the drafts for HTML 3.0 and 3.2 ...

  • Oh Excuse me ! I forgot to mention that the HTML spec now recommends that you use the &lt;pre&gt; tag instead...

  • Note to self - Don't post before drinking coffee - Sorry the &lt;PRE&gt; tag doesn't work in the same way. The problem with XMP is that its not guaranteed to work on all browsers and most likely most be future compatible, it would probably be better to use the &amp;lt; &amp;gt; method.

  • Russ,



    The reason you can't use the &amp;lt; method is because ALL DHTML TextBox controls have a problem when loading up existing content.... it turns those back into tags. Therefore, you may screw up posts, or the whole aggregated site, if you later decide to edit it, hense the reason for the tip.

  • Good point, Thats the reason why I use a simple Javascript regex to replace &lt; with &amp;lt; and so on in the event handler.

  • What event handler?

  • That is not the problem. The data goes into the database just fine. It even comes out of the database fine and gets put into viewstate just fine. The problem lies in MSHTML and how the DHTML textboxes work when they are loaded up with existing, pre-encoded data.



    It's not a problem that Javascript would fix... not that way.

  • I know what you mean, I had exactly the same problem back in the days of PHP, I just used that regex on either side of loading and submitting the text area and it worked fine. but that was suibtable for that particular problem ...

Comments have been disabled for this content.