Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d468bd3

Browse files
committed
Sjoerd Mullender:
These two fixes were approved by me. Peter Kropf: There's a problem with the xmllib module when used with JPython. Specifically, the JPython re module has trouble with the () characters in strings passed into re.compile. Spiros Papadimitriou: I just downloaded xmllib.py ver. 0.3 from python.org and there seems to be a slight typo: Line 654 ("tag = self.stack[-1][0]" in parse_endtag), is indented one level more than it should be. I just thought I'd let you know...
1 parent 7c6395a commit d468bd3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/xmllib.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
attrfind = re.compile(
2828
_S + '(?P<name>' + _Name + ')'
2929
'(' + _opS + '=' + _opS +
30-
'(?P<value>'+_QStr+'|[-a-zA-Z0-9.:+*%?!()_#=~]+))?')
30+
'(?P<value>'+_QStr+'|[-a-zA-Z0-9.:+*%?!\(\)_#=~]+))?')
3131
starttagopen = re.compile('<' + _Name)
3232
starttagend = re.compile(_opS + '(?P<slash>/?)>')
3333
starttagmatch = re.compile('<(?P<tagname>'+_Name+')'
@@ -43,8 +43,8 @@
4343
# SYSTEM SystemLiteral
4444
# PUBLIC PubidLiteral SystemLiteral
4545
_SystemLiteral = '(?P<%s>'+_QStr+')'
46-
_PublicLiteral = '(?P<%s>"[-\'()+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*"|' \
47-
"'[-()+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*')"
46+
_PublicLiteral = '(?P<%s>"[-\'\(\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*"|' \
47+
"'[-\(\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*')"
4848
_ExternalId = '(?:SYSTEM|' \
4949
'PUBLIC'+_S+_PublicLiteral%'pubid'+ \
5050
')'+_S+_SystemLiteral%'syslit'
@@ -652,7 +652,7 @@ def parse_endtag(self, i):
652652
return i+1
653653
if not self.__accept_missing_endtag_name:
654654
self.syntax_error('no name specified in end tag')
655-
tag = self.stack[-1][0]
655+
tag = self.stack[-1][0]
656656
k = i+2
657657
else:
658658
tag = res.group(0)

0 commit comments

Comments
 (0)