8000 Bug breaking links: linkUrlsInTrustedHtml does not handle entities correctly · Issue #2 · youthweb/urllinker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Bug breaking links: linkUrlsInTrustedHtml does not handle entities correctly #2
Open
@Llbe

Description

@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>&amp;a=b"

The expected result is
string(56) "<a href="http://foo.bar/baz?a=b&amp;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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0