From: Guido van Rossum Date: Mon, 24 Aug 1998 20:59:13 +0000 (+0000) Subject: Patch by Chris Herborth (posted to comp.lang.python)to make it behave X-Git-Tag: v1.5.2a2~356 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fdf85254c1438760efb452de0fdb1774f29d783;p=python Patch by Chris Herborth (posted to comp.lang.python)to make it behave with tags that have - or . in their names. --- diff --git a/Lib/sgmllib.py b/Lib/sgmllib.py index d04204971f..ffb2ccc348 100644 --- a/Lib/sgmllib.py +++ b/Lib/sgmllib.py @@ -24,8 +24,8 @@ entityref = re.compile('&([a-zA-Z][-.a-zA-Z0-9]*)[^a-zA-Z0-9]') charref = re.compile('&#([0-9]+)[^0-9]') starttagopen = re.compile('<[>a-zA-Z]') -shorttagopen = re.compile('<[a-zA-Z][a-zA-Z0-9]*/') -shorttag = re.compile('<([a-zA-Z][a-zA-Z0-9]*)/([^/]*)/') +shorttagopen = re.compile('<[a-zA-Z][-.a-zA-Z0-9]*/') +shorttag = re.compile('<([a-zA-Z][-.a-zA-Z0-9]*)/([^/]*)/') piopen = re.compile('<\?') piclose = re.compile('>') endtagopen = re.compile('a-zA-Z]') @@ -33,7 +33,7 @@ endbracket = re.compile('[<>]') special = re.compile(']*>') commentopen = re.compile('