diff --git a/scrubber/__init__.py b/scrubber/__init__.py index 284a02e..17c5b55 100644 --- a/scrubber/__init__.py +++ b/scrubber/__init__.py @@ -131,7 +131,8 @@ def _autolink(node): text = node text2 = urlize(text, nofollow=self.nofollow) if text != text2: - node.replaceWith(text2) + a=BeautifulSoup(text2) + node.replaceWith(a.a) else: if node.name == "a": return