Permalink
Browse files

Added XHTML support for  , ©, and ® was illegal. Fixed.

  • Loading branch information...
1 parent 7454be4 commit 731005698fd8d972993f84031952385413ff74a2 nakahiro committed Jun 23, 2000
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/cgi.pl
View
@@ -1,4 +1,4 @@
-# $Id: cgi.pl,v 2.49 2000-06-22 13:08:24 nakahiro Exp $
+# $Id: cgi.pl,v 2.50 2000-06-23 10:12:26 nakahiro Exp $
# Small CGI tool package(use this with jcode.pl-2.0).
@@ -766,6 +766,9 @@ sub secureXHTML
local( $srcString, $tag, $need, $emptyElement, $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;
@@ -820,6 +823,9 @@ sub secureXHTML
}
$string =~ s/__EscapedGt\377__/\\>/go;
$string =~ s/__EscapedQuote\377__/\\"/go;
+ $string =~ s/ ?/__HtmlNbsp\377__/go;
+ $string =~ s/©?/__HtmlCopy\377__/go;
+ $string =~ s/®?/__HtmlReg\377__/go;
$string =~ s/&/&/g;
$string =~ s/"/"/g;
$string =~ s/</&lt;/g;

0 comments on commit 7310056

Please sign in to comment.