15 lines
261 B
Plaintext
Executable File
15 lines
261 B
Plaintext
Executable File
# html_escape(string)
|
|
# Convert &, < and > codes in text to HTML entities
|
|
sub html_escape
|
|
{
|
|
local($tmp);
|
|
$tmp = $_[0];
|
|
$tmp =~ s/&/&/g;
|
|
$tmp =~ s/</</g;
|
|
$tmp =~ s/>/>/g;
|
|
$tmp =~ s/\"/"/g;
|
|
$tmp =~ s/\'/'/g;
|
|
$tmp =~ s/=/=/g;
|
|
return $tmp;
|
|
}
|