jamin on July 19th, 2002

I made some mods to the site so that new tags will be accepted in comments and wrote a simple perl script to markup code before posting. Now i want to test posting code to a story. So here is the code I use to markup code before posting:


#!/usr/bin/perl -w
print "<pre><code>
";
while (<>) {
	s/&/&amp;/g;
	s/</&lt;/g;
	s/>/&gt;/g;
	s///g;
	print;
}
print "</pre></code>
";

Tags: