Index: cms/converters.py
===================================================================
--- a/cms/converters.py
+++ b/cms/converters.py
@@ -326,9 +326,7 @@
return ''.join((pre, jinja2.Markup.escape(url), post))
- text = re.sub(r'(]*\b(href)=\")([^<>\"]+)(\")',
- process_link, text)
- text = re.sub(r'(]*\b(src)=\")([^<>\"]+)(\")',
+ text = re.sub(r'(<[\w]+\s[^<>]*\b(href|src)=\")([^<>\"]+)(\")',
process_link, text)
return text
Index: tests/expected_output/relative/de/rel_path
===================================================================
--- a/tests/expected_output/relative/de/rel_path
+++ b/tests/expected_output/relative/de/rel_path
@@ -1,20 +1,34 @@
+
+
+
+ Page Title
+
+
+
+
+
-Simple TS with default: Übersetzen.
-Same TS with no default: Übersetzen.
-Nested translation: Bar und Baz.
-Link resolving: Diese Seite.
-Link to a non-translatable page: Seitenverzeichnis.
-Entity escaping in links: Bar.
-Image link:
-Link to external source: Bar
-Link to self:
-Link to self with extension:
-Relative link to local page:
-Absolute link to local page:
-Relative link to different locale:
-Absolute link to diferent locale:
-Relative link to page in subfolder:
-Absolute link to page in subfolder:
+ Simple TS with default: Übersetzen.
+ Same TS with no default: Übersetzen.
+ Nested translation: Bar und Baz.
+ Link resolving: Diese Seite.
+ Link to a non-translatable page: Seitenverzeichnis.
+ Entity escaping in links: Bar.
+ Image link:
+ Iframe link:
+ Script link:
+ Input link:
+ Link to external source: Bar
+ Link to self:
+ Link to self with extension:
+ Relative link to local page:
+ Absolute link to local page:
+ Relative link to different locale:
+ Absolute link to diferent locale:
+ Relative link to page in subfolder:
+ Absolute link to page in subfolder:
+ Resource URL:
+
Index: tests/expected_output/relative/en/rel_path
===================================================================
--- a/tests/expected_output/relative/en/rel_path
+++ b/tests/expected_output/relative/en/rel_path
@@ -1,20 +1,34 @@
+
+
+
+ Page Title
+
+
+
+
+
-Simple TS with default: Translate.
-Same TS with no default: Translate.
-Nested translation: Foo and Baz.
-Link resolving: This page.
-Link to a non-translatable page: Site map.
-Entity escaping in links: Foo.
-Image link:
-Link to external source: Bar
-Link to self:
-Link to self with extension:
-Relative link to local page:
-Absolute link to local page:
-Relative link to different locale:
-Absolute link to diferent locale:
-Relative link to page in subfolder:
-Absolute link to page in subfolder:
+ Simple TS with default: Translate.
+ Same TS with no default: Translate.
+ Nested translation: Foo and Baz.
+ Link resolving: This page.
+ Link to a non-translatable page: Site map.
+ Entity escaping in links: Foo.
+ Image link:
+ Iframe link:
+ Script link:
+ Input link:
+ Link to external source: Bar
+ Link to self:
+ Link to self with extension:
+ Relative link to local page:
+ Absolute link to local page:
+ Relative link to different locale:
+ Absolute link to diferent locale:
+ Relative link to page in subfolder:
+ Absolute link to page in subfolder:
+ Resource URL:
+
Index: tests/test_site/pages/rel_path.html
===================================================================
--- a/tests/test_site/pages/rel_path.html
+++ b/tests/test_site/pages/rel_path.html
@@ -1,20 +1,23 @@
-
+template = head-test
-Simple TS with default: {{ simple[desc] Translate }}.
-Same TS with no default: {{ simple }}.
-Nested translation: {{nested-ts Foo and Baz}}.
-Link resolving: {{linked-ts This page}}.
-Link to a non-translatable page: {{linked-ts2 Site map}}.
-Entity escaping in links: {{entity-lnk Foo}}.
-Image link:
-Link to external source: Bar
-Link to self:
-Link to self with extension:
-Relative link to local page:
-Absolute link to local page:
-Relative link to different locale:
-Absolute link to diferent locale:
-Relative link to page in subfolder:
-Absolute link to page in subfolder:
+ Simple TS with default: {{ simple[desc] Translate }}.
+ Same TS with no default: {{ simple }}.
+ Nested translation: {{nested-ts Foo and Baz}}.
+ Link resolving: {{linked-ts This page}}.
+ Link to a non-translatable page: {{linked-ts2 Site map}}.
+ Entity escaping in links: {{entity-lnk Foo}}.
+ Image link:
+ Iframe link:
+ Script link:
+ Input link:
+ Link to external source: Bar
+ Link to self:
+ Link to self with extension:
+ Relative link to local page:
+ Absolute link to local page:
+ Relative link to different locale:
+ Absolute link to diferent locale:
+ Relative link to page in subfolder:
+ Absolute link to page in subfolder:
+ Resource URL:
-
Index: tests/test_site/templates/head-test.tmpl
===================================================================
new file mode 100644
--- /dev/null
+++ b/tests/test_site/templates/head-test.tmpl
@@ -0,0 +1,11 @@
+
+
+
+{{ head | safe }}
+ Page Title
+
+
+
+
+{{ body | safe }}
+