mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Test that SITEURL with special characters gets escaped in link replacement.
This commit is contained in:
parent
fb587e1ae6
commit
96eebd8ea3
1 changed files with 15 additions and 0 deletions
|
|
@ -331,6 +331,21 @@ class TestPage(LoggedTestCase):
|
|||
'<a href="http://notmyidea.org/article.html">link</a>'
|
||||
)
|
||||
|
||||
# SITEURL with characters that should be escaped
|
||||
args['content'] = (
|
||||
'A simple test, with a '
|
||||
'<a href="|filename|article.rst'
|
||||
'#highlight="word"">link</a>'
|
||||
)
|
||||
content = Page(**args).get_content('http://notmyidea.org/'
|
||||
'?app=blog&path=')
|
||||
self.assertEqual(
|
||||
content,
|
||||
'A simple test, with a '
|
||||
'<a href="http://notmyidea.org/?app=blog&path='
|
||||
'/article.html#highlight="word"">link</a>'
|
||||
)
|
||||
|
||||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue