Python: add > escaping
This commit is contained in:
@@ -20,7 +20,10 @@ class TextNode(object):
|
||||
return self.textContent
|
||||
|
||||
def __str__(self):
|
||||
return self.textContent.replace('&', '&').replace('<', '<')
|
||||
return (self.textContent
|
||||
.replace('&', '&')
|
||||
.replace('<', '<')
|
||||
.replace('>', '>'))
|
||||
|
||||
|
||||
class Element(object):
|
||||
|
||||
Reference in New Issue
Block a user