Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Urls with localhost:port number will not work #119

Open
11mb opened this issue Feb 25, 2022 · 1 comment · May be fixed by #148
Open

Urls with localhost:port number will not work #119

11mb opened this issue Feb 25, 2022 · 1 comment · May be fixed by #148

Comments

@11mb
Copy link

11mb commented Feb 25, 2022

Take e.g.: the url: <p>check de link <a href="http:https://localhost:4200/forum/category/2">everyone</a></p> and it will not work. You can check this on the demo page also: https://alexcorvi.github.io/anchorme.js/

Expected outcome:
check the link everyone -> where everyone is a link to http:https://localhost:4200/forum/category/2

Actual Outcome:
check the link everyonehttp:https://localhost:4200/forum/category/2">everyone>

@lionel-rowe
Copy link

A more minimal example:

const input = `<a href="http:https://localhost:80"></a>`

anchorme(input)
'<a href="<a href="http:https://localhost:80"></a">http:https://localhost:80"></a</a>>'

anchorme.list(input)
[
    {
        "start": 9,
        "end": 33,
        "string": "http:https://localhost:80\"></a",
        "isURL": true,
        "protocol": "http:https://",
        "confirmedByProtocol": true,
        "path": "/a",
        "reason": "url"
    }
]

anchorme.list(input, false)
// same as above, `skipHTML=false` makes no difference

@lionel-rowe lionel-rowe linked a pull request May 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants