Home » Archives » February 2005 » Do Not Execute
[Previous entry: "Predictable Line Drawings"] [Next entry: "Spammed Out?"]
Do Not Execute - or
Posting Code in Greymatter Blogs
category: software
I was having trouble posting sample html code in my Greymatter blog. Greymatter insisted on executing the code rather than allowing me to post code as if it were text. It seemed ridiculous that I couldn't post code in a blog.
I brought my trouble to the Greymatter forums at www.greymatterforums.com, and they were very helpful. I got multiple suggestions as to how to work around the problem and decided to use the most straightforward solution.
When Greymatter sees the less than symbol, <, it thinks html always follows. If you want to post code, you need to use the following special character:
| A M P | l t ;
That's vertical bar, capital A, capital M, capital P, vertical bar, lower case l, lower case t, and semi-colon. These eight characters replace the *less than* symbol. Remove the blank spaces between the characters. I posted them with the spaces so Greymatter would not interpret them.
It's very simple to make this change in a text editor such as TextPad or WordPad by using the find and replace function.
This trick is also helpful when putting " entities into Greymatter templates to keep your pages xhtml compliant. You must replace the ampersand with |AMP|, or Greymatter will convert the entity to a straight quote symbol.
She said on 02.17.05 @ 01:07 PM CST
