From 5fdf85254c1438760efb452de0fdb1774f29d783 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 24 Aug 1998 20:59:13 +0000 Subject: Patch by Chris Herborth (posted to comp.lang.python)to make it behave with tags that have - or . in their names. --- Lib/sgmllib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Lib/sgmllib.py') 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('