Home » Archives » February 2005 » Do Not Execute

[Previous entry: "Predictable Line Drawings"] [Next entry: "Spammed Out?"]


Thursday, February 17th

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.

Entry Author

She said on 02.17.05 @ 01:07 PM CST


Notes to readers:
This is a printer friendly page.

More on this general topic, or any other, can easily be found by clicking on the links in the Search by Category section of the sidebar. Highly specific, or cross topic searches can be performed by entering key words in the Search by Keyword form in the sidebar.

Readers with Internet Explorer can use these links to "Add to Favorites."

Click here to add this page to your favorites!
Click here to add this site to your favorites!

Remember, these Awesome Tips and Tricks are also provided by the other members of our back office staff. Awesomely Active Web Design, located in Chicago, creates and extends web sites with focus on e-business applications and custom design. Oh, the guys in the front office want us to remind you to check out our services links because we do, after all, do this stuff for a living.

Awesome Services