I modified my local copy of FrameChat2 (v. 2.04) to use the <c></c> shortcut for <code></code> tags. Below is the diff (`diff -u framechat.pl framechat.pl.ori` - the unmodified version being named framechat.pl.ori). I cannot recall, though, if I had modified it previously in a way that would result in differing line numbers. Thought maybe it might prove helpful to someone, though.
--- framechat.pl.ori Sat Jun 11 16:41:08 2005
+++ framechat.pl Sat Jun 11 17:41:16 2005
@@ -126,6 +126,7 @@
'[http://] ',
'[ftp://] ',
'<code></code> ',
+'<c></c> ',
'<tt></tt> ',
'<a href=""></a> ',
'/ignore ',
@@ -912,6 +913,8 @@
$content=~s/<code>(.*?)<\/code>/codefix($1)/eig; # encodes the code
+and changes pairs of balanced 'code' tags to 'ccc'
$content=~s/(<\/?code>)/encode_entities($1)/eig; # nuke unbalanced c
+ode tags
+ $content=~s/<c>(.*?)<\/c>/codefix($1)/eig; # encodes the c tag and c
+hanges pairs of balanced 'c' tags to 'ccc'
+ $content=~s/(<\/?c>)/encode_entities($1)/eig; # nuke unbalanced c ta
+gs
$content=~s/<ccc>/<code>/ig; # restore <ccc>
$content=~s/<\/ccc>/<\/code>/ig; # restore </ccc>
@@ -967,10 +970,10 @@
}
if(($i{'n'} && $i{'n'} =~ /^hist|(?:view|search) history$/) || $i{'hi
+stbyauth'}){
- $content=~s/(<(?!(a\s|tt>|code>|i>|\/a>|\/tt>|\/code>|\/i>)))/encode
+_entities($1)/eig; # only allow a, tt, i & code tags
+ $content=~s/(<(?!(a\s|tt>|code>|c>|i>|\/a>|\/tt>|\/code>|\/c>|\/i>))
+)/encode_entities($1)/eig; # only allow a, tt, i & code/c tags
}
else{
- $content=~s/(<(?!(a\s|tt>|code>|\/a>|\/tt>|\/code>)))/encode_entitie
+s($1)/eig; # or only allow a, tt & code tags
+ $content=~s/(<(?!(a\s|tt>|code>|c>|\/a>|\/tt>|\/code>|\/c>)))/encode
+_entities($1)/eig; # or only allow a, tt & code/c tags
}
return $content;
}
|