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

Fred L. Drake fdrake@users.sourceforge.net
Fri, 13 Jul 2001 22:50:35 -0700


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

Modified Files:
	sgmllib.py 
Log Message:

Be more permissive in what is accepted as an attribute name; this makes
this module slightly more resiliant in the face of XHTML input, or just
colons in attribute names.


Index: sgmllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sgmllib.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** sgmllib.py	2001/07/05 18:21:57	1.32
--- sgmllib.py	2001/07/14 05:50:33	1.33
***************
*** 37,41 ****
  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./:;+*%?!&$\(\)_#=~\'"]*))?')
  
--- 37,41 ----
  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./:;+*%?!&$\(\)_#=~\'"]*))?')