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