summaryrefslogtreecommitdiff
path: root/beautifulsoup/element.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-10 16:41:10 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-10 16:41:10 -0500
commitd89c8878ea86a2575c87e9fad8081cfcd81e0bcd (patch)
treecdad3f97812e658d84a611b6017b7198fd97d818 /beautifulsoup/element.py
parente1ad4220e5ca00ec0e7f77ce5087845fcb356a0e (diff)
Added some elementary doctype handling.
Diffstat (limited to 'beautifulsoup/element.py')
-rw-r--r--beautifulsoup/element.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/beautifulsoup/element.py b/beautifulsoup/element.py
index 7ecd482..b2e0e12 100644
--- a/beautifulsoup/element.py
+++ b/beautifulsoup/element.py
@@ -370,6 +370,11 @@ class Declaration(NavigableString):
def decodeGivenEventualEncoding(self, eventualEncoding):
return u'<!' + self + u'>'
+class Doctype(NavigableString):
+
+ def decodeGivenEventualEncoding(self, eventualEncoding):
+ return u'<!DOCTYPE ' + self + u'>'
+
class Tag(PageElement, Entities):
"""Represents a found HTML tag with its attributes and contents."""