Permalink
Browse files

Added XHTML support for  , ©, and ®.

  • Loading branch information...
1 parent 4338c17 commit 2f684e15b1911fc952bbbbe289b58e45ed6bd282 nakahiro committed Jun 22, 2000
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/cgi.pl
View
@@ -1,4 +1,4 @@
-# $Id: cgi.pl,v 2.48 2000-06-14 15:20:26 nakahiro Exp $
+# $Id: cgi.pl,v 2.49 2000-06-22 13:08:24 nakahiro Exp $
# Small CGI tool package(use this with jcode.pl-2.0).
@@ -684,6 +684,9 @@ sub SecureHtmlEx
local( $srcString, $tag, $need, $feature, $markuped );
$string =~ s/\\>/__EscapedGt\377__/go;
+ $string =~ s/ ?/__HtmlNbsp\377__/go;
+ $string =~ s/©?/__HtmlCopy\377__/go;
+ $string =~ s/®?/__HtmlReg\377__/go;
$string =~ s/&?/__HtmlAmp\377__/go;
$string =~ s/"?/__HtmlQuote\377__/go;
$string =~ s/<?/__HtmlLt\377__/go;
@@ -741,6 +744,9 @@ sub SecureHtmlEx
$string =~ s/"/"/g;
$string =~ s/</&lt;/g;
$string =~ s/>/&gt;/g;
+ $string =~ s/__HtmlNbsp\377__/&nbsp;/go;
+ $string =~ s/__HtmlCopy\377__/&copy;/go;
+ $string =~ s/__HtmlReg\377__/&reg;/go;
$string =~ s/__HtmlAmp\377__/&amp;/go;
$string =~ s/__HtmlQuote\377__/&quot;/go;
$string =~ s/__HtmlLt\377__/&lt;/go;

0 comments on commit 2f684e1

Please sign in to comment.