forked from github/pelican
fix python3 support
This commit is contained in:
parent
7b59b34a73
commit
2a3d7d0319
2 changed files with 6 additions and 3 deletions
|
|
@ -26,7 +26,10 @@ except ImportError:
|
|||
import re
|
||||
|
||||
import cgi
|
||||
from HTMLParser import HTMLParser
|
||||
try:
|
||||
from html.parser import HTMLParser
|
||||
except ImportError:
|
||||
from HTMLParser import HTMLParser
|
||||
|
||||
from pelican.contents import Category, Tag, Author
|
||||
from pelican.utils import get_date, pelican_open
|
||||
|
|
|
|||
|
|
@ -286,9 +286,9 @@ class HTMLReaderTest(unittest.TestCase):
|
|||
content, metadata = reader.read(_path('article_with_metadata.html'))
|
||||
expected = {
|
||||
'category': 'yeah',
|
||||
'author': u'Alexis Métaireau',
|
||||
'author': 'Alexis Métaireau',
|
||||
'title': 'This is a super article !',
|
||||
'summary': u'''Summary and stuff''',
|
||||
'summary': 'Summary and stuff',
|
||||
'date': datetime.datetime(2010, 12, 2, 10, 14),
|
||||
'tags': ['foo', 'bar', 'foobar'],
|
||||
'custom_field': 'http://notmyidea.org',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue