Various improvements in both pod and gen.
This commit is contained in:
parent
1c0744da85
commit
37cf9e7a4f
27 changed files with 227 additions and 49 deletions
|
@ -29,6 +29,7 @@ XHTML_INNER_TAGS = ('b', 'i', 'u', 'em')
|
|||
XHTML_UNSTYLABLE_TAGS = XHTML_LISTS + ('li', 'a')
|
||||
XML_SPECIAL_CHARS = {'<': '<', '>': '>', '&': '&', '"': '"',
|
||||
"'": '''}
|
||||
XML_ENTITIES = {'lt': '<', 'gt': '>', 'amp': '&', 'quot': '"', 'apos': "'"}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
class PodError(Exception):
|
||||
|
|
|
@ -59,6 +59,10 @@ HTML_ENTITIES = {
|
|||
'ucirc':'û', 'uuml':'ü', 'yacute':'ý', 'thorn':'þ', 'yuml':'ÿ',
|
||||
'euro':'€', 'nbsp':' ', "rsquo":"'", "lsquo":"'", "ldquo":"'",
|
||||
"rdquo":"'", 'ndash': ' ', 'oelig':'oe', 'quot': "'", 'mu': 'µ'}
|
||||
import htmlentitydefs
|
||||
for k, v in htmlentitydefs.entitydefs.iteritems():
|
||||
if not HTML_ENTITIES.has_key(k) and not XML_ENTITIES.has_key(k):
|
||||
HTML_ENTITIES[k] = ''
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
class Entity:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue