Dave Burke : Freelance .NET Web Developer specializing in Online Communities

CSBlogs : Preserving the rel="tag" when adding Technorati tags

I don't do TDD, but I do thoroughly test my code before calling it done, so while testing the new integrated CS bookmarklet I just added that I was not preserving the rel="tag" hyperlink attribute on the post.  The rel="tag" attribute is necessary for Technorati to pick up the tag.

The CS HTMLScrubber was saying hello again.  REL is not one of the attributes preserved by the CS scrubber, so I modified the communityserver.config file to add the attribute in the Markup section as well as to the NameValueCollection in CSComponents\htmlScrubber.cs.

    public class HtmlScrubber
    {
        static NameValueCollection DefaultTags()
        {
           NameValueCollection defaultTags = new NameValueCollection();
             ......
            defaultTags.Add("br", "");
            defaultTags.Add("a", "href,target,name,rel");
            defaultTags.Add("span", "align");
            return defaultTags;
        }
    }

So if you're adding tags in CS, make sure to check the rel="tag" is retained in your post.

Technorati Tags:

Comments (0) | Post RSS RSS comment feed

Posted on 12/9/2005 5:11:00 AM by Dave Burke
Categories: Community Server
Tags:

Related posts


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke