Full Speed

[ April 19, 2006 ]

Meta Descriptions in Movable Type

I have been seriously neglecting the meta tags in my Movable Type blogs. In fact, other than the requisite content type declaration, I haven’t been using meta tags at all. That change today when I finally added entry excerpts into the meta descriptions.

After the first test, I noticed that there was a slight problem. If the excerpt contained quotes, they were not escaped in any way and invalidated the page. Brad Choate’s MT Regex plugin saves the day again:

<MTAddRegex name="dequote">s|"|'|g</MTAddRegex>
<meta name="description" content="<$MTEntryExcerpt regex="dequote"$>" />

Possibly Related:

© 2014 Scott Johnson
• •