+ entity = entities[name.lower()]
+ elif name[0] == "#":
+ entity = unichr(int(name[1:]))
+ else:
+ entity = "&" + name + ";"
+
+ if self.inparagraph:
+ self.currentparagraph = self.currentparagraph \
+ + unicode(entity, "utf-8")
+ elif self.inblockquote:
+ self.blockquote = self.blockquote + unicode(entity, "utf-8")