Commit 626960a1 authored by Jim Fulton's avatar Jim Fulton

Fixed a bug in handling single-character names in the entity-reference

syntax.  Turned on html quoting for entity-reference syntax.
parent 3ad511ef
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""HTML formated DocumentTemplates """HTML formated DocumentTemplates
$Id: DT_HTML.py,v 1.21 1999/08/03 23:26:17 jim Exp $""" $Id: DT_HTML.py,v 1.22 1999/08/26 14:45:48 jim Exp $"""
from DT_String import String, FileMixin from DT_String import String, FileMixin
import DT_String, regex import DT_String, regex
...@@ -145,18 +145,16 @@ class dtml_re_class: ...@@ -145,18 +145,16 @@ class dtml_re_class:
else: else:
if text[s:s+6] == '&dtml-': if text[s:s+6] == '&dtml-':
n=s+6 n=s+6
args=n+1
while 1: while 1:
e=find(text,';',args) e=find(text,';',n)
if e < 0: break if e < 0: break
args=text[n:e] args=text[n:e]
if ent_name(text[n+1:e]) > 0: if ent_name(args) < 0: break
d=self.__dict__
d=self.__dict__ d=self.__dict__
d[0]=text[s:e+1] d[0]=text[s:e+1]
d[1]=d['end']='' d[1]=d['end']=''
d[2]=d['name']='var' d[2]=d['name']='var'
d[3]=d['args']=args d[3]=d['args']=args+' html_quote'
return s return s
start=s+1 start=s+1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment