-
Notifications
You must be signed in to change notification settings - Fork 285
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
QS assuming text is URLs #214
Comments
I don't think we can come up with something better to identify URLs than Apple did.
checks if |
That's already in there. There's already a test for: [url scheme](not [url host]) What I'm thinking about is e.g. you type: google.com Alcor had implemented some kind of URL checking system to do with '.' and On 20 April 2011 20:55, HenningJ <
|
My solution for the 1st part is to create an array with all TLDs from: http://data.iana.org/TLD/tlds-alpha-by-domain.txt QS then compares the last component of the string (if it contains . and has at least 4 components) to see if it's one of these. I'll submit the code for discussion/merging (so you can see it) if nobody has any more suggestions/ideas |
right you are. BUT...there is no way to really make sure that But of course you are welcome to try. :-) |
Alcor was 99% there, I've just done another test to see if the last thing I haven't found a problem with it yet! On 20 April 2011 21:20, HenningJ <
|
If it works...great. :-) |
This has always bothered me. Glad to see it getting some attention. In the interface, it’s more of an annoyance, while in the clipboard history it’s actually broken. If you grab some text like “this.com”, it thinks it’s a URL and shows those actions by default, but the text actions should all still be available, shouldn’t they? What do you mean by “only has URL actions”? When I grab a selection that QS thinks is a URL, not only can I run “Large Text” on it, but I’ll only see the actual text as selected. Here’s what’s broken: If I copy “this.com” to the clipboard, then use the clipboard history to paste it, I’ll end up with “http://this.com”, which is obviously wrong. Something else I don’t quite understand from your initial report: Are you saying that after doing a web search, the search terms in the first pane are treated like a URL? Unconditionally? |
Maybe it's just me, but if I copy 'this.com' to my QS clipboard, copy some RE the example of search terms. It's not the returned objects that are being e.g. On 20 April 2011 23:02, skurfer <
|
Oops - and I've just realised typing define:hello is still seen as a URL :( |
OK fixed the define:hello bug. That was the main annoyance with this in the first place. Can't believe I forgot about this! |
Yeah, it was just you because you were running on code you just wrote. ;) I’m testing from your pull request and now the text gets pasted correctly. This has been a pain in my ass for years. It still looks like a URL in the history, and the second line is prefixed with “http://”, but we can file all sorts of issues on the clipboard module. |
Yay fixed more than one bug in one go! Me likes :) I thought I was testing One more commit to make then it should be able to be merged. On 20 April 2011 23:58, skurfer <
|
Fixed in pull request #238 |
First off, here are some problems:
QS thinks this is a URL because of the semi-colon
QS thinks it's a URL again
Secondly, QS is returning text to the 1st pane, and thinking its a URL (even when the two above isn't true)
Where I cam across it:
Install the Web Search Module
Enter text in the 1st pane (e.g. quicksilver) -> Find With -> Any search engine you have
Reopen QS. The text you entered is in the 1st pane as a text object, but only has URL actions
This second problem is most likely a problem with the web search plugin itself. I know @skurfer has been dealing with returning things to the 1st pane recently, so he may have some ideas on this.
The 1st problem is most likely to do with what's written in QSObject_StringHandling.m:59
We need a more rigorous test to see if it's a url.
My suggestions for string tests are:
if it contains ://
if it contains 2 or more dots
if it contains www.
if it contains typical tlds?
e.g. .com,.co.uk,.org etc. etc. - this may be a tough one to validate with so many tlds in existence.
The text was updated successfully, but these errors were encountered: