Bug breaking links: linkUrlsInTrustedHtml does not handle entities correctly
Created by: Llbe
$urlLinker = new Youthweb\UrlLinker\UrlLinker();
var_dump ($urlLinker->linkUrlsInTrustedHtml ("http://foo.bar/baz?a=b&a=b"));
The result here is
string(56) "<a href="http://foo.bar/baz?a=b">foo.bar/baz</a>&a=b"
The expected result is
string(56) "<a href="http://foo.bar/baz?a=b&a=b">foo.bar/baz</a>"
This is a bug since '&' must be encoded in HTML (to avoid conflict with the encoding) and linkUrlsInTrustedHtml() expects valid HTML.