[Python-checkins] CVS: python/dist/src/Lib sgmllib.py,1.30,1.30.2.1

Fred L. Drake fdrake@users.sourceforge.net
Thu, 05 Jul 2001 11:22:50 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv16563

Modified Files:
      Tag: release21-maint
	sgmllib.py 
Log Message:

Allow underscores in tag names and quote characters in unquoted attribute
values.  The change for attribute values matches the way Mozilla and
Navigator view the world, at least.

This closes SF bug #436621.


Index: sgmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sgmllib.py,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -C2 -r1.30 -r1.30.2.1
*** sgmllib.py	2001/04/15 13:01:41	1.30
--- sgmllib.py	2001/07/05 18:22:48	1.30.2.1
***************
*** 35,42 ****
  commentopen = re.compile('<!--')
  commentclose = re.compile(r'--\s*>')
! tagfind = re.compile('[a-zA-Z][-.a-zA-Z0-9]*')
  attrfind = re.compile(
      r'\s*([a-zA-Z_][-.a-zA-Z_0-9]*)(\s*=\s*'
!     r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:;+*%?!&$\(\)_#=~]*))?')
  
  declname = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*')
--- 35,42 ----
  commentopen = re.compile('<!--')
  commentclose = re.compile(r'--\s*>')
! tagfind = re.compile('[a-zA-Z][-_.a-zA-Z0-9]*')
  attrfind = re.compile(
      r'\s*([a-zA-Z_][-.a-zA-Z_0-9]*)(\s*=\s*'
!     r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:;+*%?!&$\(\)_#=~\'"]*))?')
  
  declname = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*')