mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Decode HTML entities in titles on WP import
This commit is contained in:
parent
bfc963a065
commit
e2c3701757
4 changed files with 71 additions and 4 deletions
|
|
@ -47,3 +47,13 @@ class TestWordpressXmlImporter(unittest.TestCase):
|
|||
rst_files = (r(f) for f in silent_f2p(posts, 'rst', temp,
|
||||
strip_raw=True))
|
||||
self.assertFalse(any('<iframe' in rst for rst in rst_files))
|
||||
|
||||
def test_decode_html_entities_in_titles(self):
|
||||
posts = list(self.posts)
|
||||
test_posts = [post for post in posts if post[2] == 'html-entity-test']
|
||||
self.assertTrue(len(test_posts) == 1)
|
||||
|
||||
post = test_posts[0]
|
||||
title = post[0]
|
||||
self.assertTrue(title, "A normal post with some <html> entities in the title. You can't miss them.")
|
||||
self.assertTrue('&' not in title)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue