forked from github/pelican
Fix quote escaping in read html attributes.
* Wrap HTML attributes in quotes according to their content. If it contains a double quote use single quotes, otherwise escape with double quotes. * Add escape_html utility to ensure quote entities are converted identically across Python versions. Fixes #1260
This commit is contained in:
parent
661ee49eda
commit
d333ed12c6
5 changed files with 47 additions and 11 deletions
|
|
@ -61,7 +61,7 @@ class TestCache(unittest.TestCase):
|
|||
- article_with_null_attributes.html
|
||||
- 2012-11-30_md_w_filename_meta#foo-bar.md
|
||||
"""
|
||||
self.assertEqual(generator.readers.read_file.call_count, 3)
|
||||
self.assertEqual(generator.readers.read_file.call_count, 4)
|
||||
|
||||
@unittest.skipUnless(MagicMock, 'Needs Mock module')
|
||||
def test_article_reader_content_caching(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue