If you use the linky filter in ngSanitize any html will be rendered as escaped html #9586
Description
Overview of the Issue
If you send the text <div>text</div>http://vg.no
though the linky filter the resulting text will be:
<div>text</div><a href="http://vg.no">http://vg.no</a>
Motivation for or Use Case
What I would expect was
<div>text</div><a href="http://vg.no">http://vg.no</a>
because after all that's why you use the ngBindHtml directive, to put unescaped html into the page.
Angular Version(s)
I have reproduced the bug in angular version s 1.2.25 and 1.3.0-rc.5
Browsers and Operating System
I have only tested this bug in:
- Chrome version 38.0.2125.101
- Safari version 7.1 (9537.85.10.17.1)
Reproduce the Error
Plunker to prove the bug, and that it is sanitizeText() that causes it in angular-1.2.25 and angular-1.3.0-rc.5
Suggest a Fix
The bug seems to come from line 134 in the source code when calling the global function sanitizeText(). But since $santitize() is called on line 124 it seems redundant to call sanitizeText(). But I have not read the source code to confirm my suspicion, it's just that the funciton names seems to overlap.
Related Issues
I have not found any issues about the linky filter that looks like this bug.