mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #3001 from canyon289/content_expansion
This commit is contained in:
commit
5c222ef41b
2 changed files with 11 additions and 1 deletions
|
|
@ -337,7 +337,7 @@ class Content:
|
|||
intrasite_link_regex = self.settings['INTRASITE_LINK_REGEX']
|
||||
regex = r"""
|
||||
(?P<markup><[^\>]+ # match tag with all url-value attributes
|
||||
(?:href|src|poster|data|cite|formaction|action)\s*=\s*)
|
||||
(?:href|src|poster|data|cite|formaction|action|content)\s*=\s*)
|
||||
|
||||
(?P<quote>["\']) # require value to be quoted
|
||||
(?P<path>{}(?P<value>.*?)) # the url value
|
||||
|
|
|
|||
|
|
@ -522,6 +522,16 @@ class TestPage(TestBase):
|
|||
'<img src="http://static.cool.site/images/poster.jpg"/>'
|
||||
)
|
||||
|
||||
# Image link will go to static
|
||||
args['content'] = (
|
||||
'<meta content="{static}/images/poster.jpg"/>'
|
||||
)
|
||||
content = Page(**args).get_content('http://cool.site')
|
||||
self.assertEqual(
|
||||
content,
|
||||
'<meta content="http://static.cool.site/images/poster.jpg"/>'
|
||||
)
|
||||
|
||||
def test_intrasite_link_escape(self):
|
||||
article = type(
|
||||
'_DummyArticle', (object,), {'url': 'article-spaces.html'})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue