tips and tricks for movable type
decoder from scriptygoddess
September 20, 2002
I've been meaning to blog this for a while: the ScriptyGoddess DeCoder bookmarklet - nifty for converting "<" and ">" into "<" and ">" when writing HTML code into my Tips entries so it displays properly.
Update 09.22.02: I wanted to also convert " to ", so, since I don't know how to actually make a bookmarklet (sigh), I just edited the properties on the DeCoder link in my toolbar.
This is the new stuff I pasted in:
In case it isn't clear - that's a \ followed by a double quote, then a single quote.
Oh hell, I couldn't stop there, could I? Let's convert those & to & too:
You have to put the & to & conversion first, otherwise, once the remaining characters get converted, their &s get converted too.
TrackBack: 3
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/84)
» Writing code in entries
Excerpt: If u want to write code in entries or in ordinary webpages u have to convert "<" and ">" into
Weblog: [ S K A I H I G H ]
Tracked: 03.29.03 05:40 AM
» How do I post html inside an entry?
Excerpt: cliche -------------------------------------------------------------------------------- How do I post html inside an entry without having it mess up the blog itself. I want...
Weblog: General Site Info
Tracked: 04.17.03 05:36 PM
» code in entries
Excerpt: In order to display MT code in entries (or extended entries) without MT executing that code, it looks like most people are using < and > tags in place of "". I noticed, though, that you have to type "and...
Weblog: Design MT
Tracked: 11.04.03 01:48 AM
Comments
hey,
I was wondering if you can do a code conversion for me. Hopefully you know perl.
I have this code:
and i want that converted to work in perl
is there any chance you can help me or know a place i can go to get it converted?
Thanks for your help.
oops apperntly I cant post code:
"
function cleanCAPS(str) {
capsallowed = 3; // Lowercase if more than ## CAPS in a row
do {
eval("re = /([A-Z]{" + (capsallowed+1) + ",})/g;");
myArray = str.match(re);
if (myArray) {
eval("re = /" + myArray[0] + "/;");
str = str.replace(re, ""+myArray[0].toLowerCase());
}
} while (myArray);
return str;
"
hope this time it goes thru.