Giter Site home page Giter Site logo

Comments (6)

vodik avatar vodik commented on June 27, 2024

Oops, wrong bug.

from termite.

thestinger avatar thestinger commented on June 27, 2024

It includes matching for IPv6 hosts, and I think that's what leads to a lot of false positives.

from termite.

gtmanfred avatar gtmanfred commented on June 27, 2024

also fails with if they put ) at the end of it, it should match (with the )... http://pastebin.com/NFWnLnqq)

i will mess with this tonight

from termite.

thestinger avatar thestinger commented on June 27, 2024

Well, parentheses in URLs is perfectly legal so in theory it should always match those. However, then it no longer matches a URL in parentheses correctly (http://www.example.com/). That's easy to deal with though... at the very least this can be incrementally improved.

from termite.

vodik avatar vodik commented on June 27, 2024

Honestly, I don't think we'll ever be able to do this 100% without moving to something slightly more powerful then regular expressions.

from termite.

thestinger avatar thestinger commented on June 27, 2024

This is pretty much as good as it can be now. I simply copied the most generic definition of a URL from the RFC, which will work for http, ftp, ssh, file, etc.

However, a valid url in the http scheme isn't necessarily on in the ssh scheme - that's not something can be dealt with because there are way too many schemes.

from termite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.