diff options
author | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-10 16:41:10 -0500 |
---|---|---|
committer | Leonard Richardson <leonard.richardson@canonical.com> | 2011-02-10 16:41:10 -0500 |
commit | d89c8878ea86a2575c87e9fad8081cfcd81e0bcd (patch) | |
tree | cdad3f97812e658d84a611b6017b7198fd97d818 /beautifulsoup/element.py | |
parent | e1ad4220e5ca00ec0e7f77ce5087845fcb356a0e (diff) |
Added some elementary doctype handling.
Diffstat (limited to 'beautifulsoup/element.py')
-rw-r--r-- | beautifulsoup/element.py | 5 |
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.""" |