One of the add on features contributed  by the community to the snipsnap project was an {html} macro. Here are my notes,

This was article was originally published on my snipsnap site, and I have enclosed the macro as part of my mirror site.

I need to check if it made it to the github repo.

This is tightly bound to snipsnap and the article was written when I was actively using it. The remainder of this article relates to the use cases I put it to.

ooOOOoo

It escaped the enclosed code and rendered it in raw HTML. The snipsnap macro defintion syntax was to use the embraced keyword twice, so {html}<strong>Important!</strong>{html}

I used it to include the google map widgets, the delicious tag cloud widget, getsatisfaction, which worked, see below, and Disqus which broke the backup. One of its most important extensibility features, as you can see above was it allowed Javascript.

The Disqus bug was because the backup format was XML, and snipsnap struggled with recursive CDATA elements. The Disqus scripts held CDATA elements, which snipsnap tried to enclose in the same tags. This failed on important.

I have also used this technique to get sharethis, addthis, flickr badges and pictures, wordle and big huge labs web badge to work. ( I think that’s it).

It was useful if you wanted, needed, additional parameters beyond those available in the snipsnap img macro.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.