Skip to content

Bug when parsing already linked urls with ? #263

@xdamman

Description

@xdamman
var autolinker = require('autolinker');

let html = autolinker.link(`<a href=https://www.facebook.com/hashtag/muntcentrum>#Muntcentrum</a>`);
console.log(html); // works: "<a href=https://www.facebook.com/hashtag/muntcentrum>#Muntcentrum</a>"

html = autolinker.link(`<a href=https://www.facebook.com/hashtag/muntcentrum?epa=HASHTAG>#Muntcentrum</a>`);
console.log(html); // fails: "<a href=<a href=\"https://www.facebook.com/hashtag/muntcen….com/hashtag/muntcentrum?epa=HASHTAG</a>>#Muntcentrum</a>"

See: https://runkit.com/xdamman/5c5a51eee4b0c90013568f62

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions