* APD-363 - [BE] do not replace tel: links with base_url * Correct typo * Correct test html * Correct description grammar
This commit is contained in:
parent
00dc70dbe2
commit
2a5b7e2aa3
|
@ -485,6 +485,8 @@ class Premailer(object):
|
||||||
url.startswith('cid:')
|
url.startswith('cid:')
|
||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
|
if attr == 'href' and url.startswith('tel:'):
|
||||||
|
continue
|
||||||
parent.attrib[attr] = urljoin(self.base_url, url)
|
parent.attrib[attr] = urljoin(self.base_url, url)
|
||||||
|
|
||||||
if hasattr(self.html, "getroottree"):
|
if hasattr(self.html, "getroottree"):
|
||||||
|
|
|
@ -837,6 +837,25 @@ ical-align:middle" bgcolor="red" valign="middle">Cell 2</td>
|
||||||
|
|
||||||
compare_html(expect_html, result_html)
|
compare_html(expect_html, result_html)
|
||||||
|
|
||||||
|
def test_tel_url(self):
|
||||||
|
"""if you use URL with tel: protocol, it should stay as tel:
|
||||||
|
when baseurl is used
|
||||||
|
"""
|
||||||
|
|
||||||
|
html = """<html>
|
||||||
|
<head>
|
||||||
|
<title>Title</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a href="tel:202-555-0113">202-555-0113</a>
|
||||||
|
</body>
|
||||||
|
</html>"""
|
||||||
|
|
||||||
|
p = Premailer(html, base_url='http://kungfupeople.com')
|
||||||
|
result_html = p.transform()
|
||||||
|
|
||||||
|
compare_html(result_html, html)
|
||||||
|
|
||||||
def test_uppercase_margin(self):
|
def test_uppercase_margin(self):
|
||||||
"""Option to comply with outlook.com
|
"""Option to comply with outlook.com
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue