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

Fix linkify to only link to proper URLs #5920

Merged
merged 1 commit into from
Sep 12, 2024

Commits on Sep 11, 2024

  1. Fix linkify to only link to proper URLs

    This doesn't check for really well formed URLs, but it limits the matching to
    only allowed characters in URIs.
    It makes up for escapeForHtml() being already called, so it matches `&`
    separately.
    
    Tested with:
    
        # "> should be excluded
        "https://github.com/os-autoinst/openQA.git"
        <https://github.com/os-autoinst/os-autoinst.git>
        # ) should be included
        https://de.wikipedia.org/wiki/Queen_(Band)
        # query strings should be included
        https://github.com/os-autoinst/openQA?foo=1%20&bar=*2
    
    Single quotes actually can be part of URIs so that's something we should adapt
    in our code (and use double quotes, or I remember back in usenet times we used
    `<http://...>` whenever referring to a URL in plain text)
    
    Issue: https://progress.opensuse.org/issues/166676
    perlpunk committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    61be703 View commit details
    Browse the repository at this point in the history