From 96eebd8ea37a226c1f9925b647d4c72affdae0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 10 Dec 2017 21:47:46 +0100 Subject: [PATCH] Test that SITEURL with special characters gets escaped in link replacement. --- pelican/tests/test_contents.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py index af9b06bb..d2385905 100644 --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -331,6 +331,21 @@ class TestPage(LoggedTestCase): 'link' ) + # SITEURL with characters that should be escaped + args['content'] = ( + 'A simple test, with a ' + 'link' + ) + content = Page(**args).get_content('http://notmyidea.org/' + '?app=blog&path=') + self.assertEqual( + content, + 'A simple test, with a ' + 'link' + ) + def test_intrasite_link_more(self): # type does not take unicode in PY2 and bytes in PY3, which in # combination with unicode literals leads to following insane line: