PrintPage Bugfixes SP1/1.1
1.0
Here are fixes for a couple of bugs in the printer friendly thread display page.
BHRA Webmaster
http://www.bhra.org.uk
#############################################################################################################
If you use ubbc tags inside a code box, the tags are shown instead of being interpreted.
However if you view the print page, the tags are not shown, and the extra formatting is applied!
#############################################################################################################
Sources/Printpage.pl
$threadpost =~ s~\[code\]\n*(.+?)\n*\[/code\]~
Code:
~isg;
$threadpost =~ s~\[code\]\n*(.*?)\n*\[/code\]~&codemsg($1)~eisg;
sub donoopen {
{
my %killhash = (
';' => ';',
'!' => '!',
'(' => '(',
')' => ')',
'-' => '-',
'.' => '.',
'/' => '/',
':' => ':',
'?' => '?',
'[' => '[',
'\\' => '\',
']' => ']',
'^' => '^'
);
sub codemsg {
my $code = $_[0];
if($code !~ /&\S*;/) { $code =~ s/;/;/g; }
$code =~ s~([\(\)\-\:\\\/\?\!\]\[\.\^])~$killhash{$1}~g;
$_ = qq~
Code:
~;
$_ =~ s~CODE~$code~g;
return $_;
}
}
#############################################################################################################
There is a line of code missing in Printpage.pl, which prevents the censor function from censoring messages.
#############################################################################################################
Sources/Printpage.pl
### Lets open up the thread file itself. ###
&LoadCensorList; # Load Censor List