Skip to content

username is not supported in links #76

@Simon-Laux

Description

@Simon-Laux

username + password are not supported. note that there are only limited characters supported, the rest needs to be uri encoded. Also note there ca only be a username with no password.

Examples

Just username

Input:

http://username@www.example.com

Actual Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "http://username",
                "hostname": "username",
                "scheme": "http"
            }
        }
    },
    {
        "t": "Text",
        "c": "@www.example.com"
    }
]

Expected Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "http://username@www.example.com",
                "hostname": "username",
                "scheme": "http"
            }
        }
    }
]

Username + Password

Input:

http://username:password@www.example.com

Actual Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "http://username",
                "hostname": "username:password@www.example.co",
                "punycode": {
                    "original_hostname": "username:password@www.example.co",
                    "ascii_hostname": "xn--username:password@www-.example.co",
                    "punycode_encoded_url": "http://username"
                },
                "scheme": "http"
            }
        }
    },
    {
        "t": "Text",
        "c": ":"
    },
    {
        "t": "EmailAddress",
        "c": "password@www.example.com"
    }
]

Expected Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "http://username:password@www.example.com",
                "hostname": "www.example.com",
                "scheme": "http"
            }
        }
    }
]

dclogin scheme

Input:

dclogin://example@nine.testrun.org?p=L%265j%3A%40g%3C3%5C%5Crr&v=1

Actual Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "dclogin://example",
                "hostname": "example",
                "scheme": "dclogin"
            }
        }
    },
    {
        "t": "Text",
        "c": "@nine.testrun.org?p=L%265j%3A%40g%3C3%5C%5Crr&v=1"
    }
]

Expected Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "dclogin://example@nine.testrun.org?p=L%265j%3A%40g%3C3%5C%5Crr&v=1",
                "hostname": "nine.testrun.org",
                "scheme": "dclogin"
            }
        }
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions