]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use strings for all entity values, as that is now possible
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 29 Dec 2007 18:38:41 +0000 (18:38 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 29 Dec 2007 18:38:41 +0000 (18:38 +0000)
with a Unicode string type.

Lib/htmlentitydefs.py

index bcc2420246329fac2acff2b3cb256da18cdb8c13..e2b7bf1fb885a8596ebd062a0cd7beea7149a318 100644 (file)
@@ -265,9 +265,6 @@ entitydefs = {}
 
 for (name, codepoint) in name2codepoint.items():
     codepoint2name[codepoint] = name
-    if codepoint <= 0xff:
-        entitydefs[name] = chr(codepoint)
-    else:
-        entitydefs[name] = '&#%d;' % codepoint
+    entitydefs[name] = chr(codepoint)
 
 del name, codepoint