working on new discussion system
This commit is contained in:
parent
b84c79ab96
commit
a4d391b52a
6 changed files with 81 additions and 52 deletions
|
|
@ -32,7 +32,6 @@ A package for manipulating and massaging HTML.
|
|||
use WebGUI::HTML;
|
||||
$html = WebGUI::HTML::cleanSegment($html);
|
||||
$html = WebGUI::HTML::filter($html);
|
||||
$html = WebGUI::HTML::searchAndReplace($html);
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
|
|
@ -128,32 +127,6 @@ sub filter {
|
|||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 searchAndReplace ( html )
|
||||
|
||||
Replaces all occurrences of strings specified in the config file.
|
||||
|
||||
=over
|
||||
|
||||
=item html
|
||||
|
||||
The HTML segment you want to have search and replaced.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub searchAndReplace {
|
||||
my $content = shift;
|
||||
foreach my $search (keys %{$session{config}{searchAndReplace}}) {
|
||||
my $replace = $session{config}{searchAndReplace}{$search};
|
||||
$content =~ s/\Q$search/$replace/g;
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue