Comments (12)
Although 'dot' is a legal letter of URL, I think that we can assume that all URLs will not end with dot... XD
Thanks for reporting this bug. I'll fix it ASAP.
from lilyterm.
Thanks
This URL recognition is feature, for which lilyterm is better choice than others terminal emulators ;-)
But recognizing the "sftp" can be nice too, but it is not in a "must have" catergory.
from lilyterm.
Hi,
i found another problem, the text::
... 'http://raspi.skk/gitlist/rm-hull_pcd8544/': ...
is recognized as::
http://raspi.skk/gitlist/rm-hull_pcd8544/':
regards
from lilyterm.
Similar happens with question marks and trailing parentheses ()
).
Also, URLs whose domains don't contain a dot are not recognized, so I can't click on http://bugtracker/ticket/1234
in work IRC.
from lilyterm.
r Emacs <http://emacswiki.org/wiki/EMMS>,
tries to open http://emacswiki.org/wiki/EMMS>,
What is a good rule for which chars should be stripped at the end?
Oh, I found it: http://daringfireball.net/2010/07/improved_regex_for_matching_urls
I just knew there had to be someone who already solved this.
from lilyterm.
DO NOT use that regex; it's susceptible to DoS via catastrophic backtracking.
I'm not sure a pure regex is appropriate for this; more likely you want a dead simple regex with some manual inspection to weed out false positives.
from lilyterm.
Can you further elaborate why this should be dangerous?
You just ordered us not to use that regex without explanation. I think I’m not the only who doesn’t want to get ordered around by a complete stranger.
As far as security goes, there are no bad comments here: https://news.ycombinator.com/item?id=1552766
from lilyterm.
Try matching that regex against http://www.foo.com/!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.
Depends on the engine, of course, but most engines handle nested +
/*
operators very poorly. Perl has special protection against this, so it works; PCRE (or at least pcregrep(1)
) hits some backtracking limit and aborts; Python obediently carries on for more time than I cared to finish measuring, appearing frozen in the meantime.
It's an artifact of naïve backtracking that makes pathological input take exponential time. And you'd never notice on normal input, just like the author and the HN commentors didn't. But I'd rather not have every single terminal window potentially lock up because some jerk said a malformed URL on IRC. :)
Don't use hairy regexes, and particularly not ones you just got off some guy's website, unless you really really understand what you're doing. Just use something broad and touch it up with postprocessing. Or use a real parser, I guess.
from lilyterm.
Hm, I think I understand.
How about something like http://uriparser.sourceforge.net/.
from lilyterm.
Hi again :-)
Here is opposite problem, the URL "http://localhost:8000/" is not recognized as URL. Perhaps due port number?
from lilyterm.
@Tetralet You should close this issue. It is not closed.
from lilyterm.
Hm, I still get (https://something.xyz)
recognized as https://something.xyz)
.
Cool would be if URLs with \n
in between them could be recognized, too. Something like: If it hits \n
, try to match until the next space nonetheless and strip out every \n
.
from lilyterm.
Related Issues (20)
- URL regexes cannot be disabled
- join with directory params HOT 1
- save tabs (session) HOT 1
- Is there a way to set the font for CJK characters separately? HOT 5
- Prompt every time i close a terminal HOT 1
- copy paste keyboard HOT 2
- New tab key bindings
- Default to TERM=xterm-256color HOT 1
- Feature Request load background image (like xpm) from commandline
- Can not input Chinese punctuation properly in FreeBSD 11 HOT 2
- Vim in Lilyterm HOT 3
- NOT an issue
- Breaking escape codes in combination with neovim HOT 1
- LilyTerm closes all tabs if i press [x] on tab HOT 4
- LilyTerm closes window if i press [x] on selected tab
- Allow-bold deprecation
- LilyTerm doesn't allow setting inner window border
- Weird characters displayed on certain commands
- COLORTERM=lilyterm is not detected by programs, we should set to “truecolor” HOT 1
- Crash on start HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lilyterm.