- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 11 Jul 2007 12:57:34 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv29441
Modified Files:
check
Log Message:
fixing xml whitespace detection to use two-digits hex characters, so that perl properly recognises them
Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.537
retrieving revision 1.538
diff -u -d -r1.537 -r1.538
--- check 10 Jul 2007 03:30:13 -0000 1.537
+++ check 11 Jul 2007 12:57:32 -0000 1.538
@@ -1941,22 +1941,22 @@
# the 10 first lines should be safe
my $parseModeFromXMLDecl = (
$begincontent
- =~ /^ [\x20|\x9|\xD|\xA]* # whitespace before the decl should not be happening
+ =~ /^ [\x20|\x09|\x0D|\x0A]* # whitespace before the decl should not be happening
# but we are greedy for the sake of detection, not validation
<\?xml # start matching an XML Declaration
- [\x20|\x9|\xD|\xA]+ # x20, x9, xD and xA are the allowed "xml white space"
- version [\x20|\x9|\xD|\xA]* = # for documents, version info is mandatory
- [\x20|\x9|\xD|\xA]* ("1.0"|"1.1"|'1.0'|'1.1') # hardcoding the existing XML versions.
+ [\x20|\x09|\x0D|\x0A]+ # x20, x09, xD and xA are the allowed "xml white space"
+ version [\x20|\x09|\x0D|\x0A]* = # for documents, version info is mandatory
+ [\x20|\x09|\x0D|\x0A]* ("1.0"|"1.1"|'1.0'|'1.1') # hardcoding the existing XML versions.
# Maybe we should use \d\.\d
- ([\x20|\x9|\xD|\xA]+ encoding
- [\x20|\x9|\xD|\xA]* = [\x20|\x9|\xD|\xA]*
+ ([\x20|\x09|\x0D|\x0A]+ encoding
+ [\x20|\x09|\x0D|\x0A]* = [\x20|\x09|\x0D|\x0A]*
("[A-Za-z][a-zA-Z0-9_-]+"|'[A-Za-z][a-zA-Z0-9_-]+')
)? # encoding info is optional
- ([\x20|\x9|\xD|\xA]+ standalone
- [\x20|\x9|\xD|\xA]* = [\x20|\x9|\xD|\xA]*
+ ([\x20|\x09|\x0D|\x0A]+ standalone
+ [\x20|\x09|\x0D|\x0A]* = [\x20|\x09|\x0D|\x0A]*
("yes"|"no"|'yes'|'no')
)? # ditto standalone info, optional
- [\x20|\x9|\xD|\xA]* \?> # end of XML Declaration
+ [\x20|\x09|\x0D|\x0A]* \?> # end of XML Declaration
/x
? 'XML' : 'TBD' );
Received on Wednesday, 11 July 2007 12:57:40 UTC