Jump to content

Open URL action fails with non-ASCII {query} as URL [Fixed 2.2 b240]


deanishe
 Share

Recommended Posts

It seems I originally posted this in the Workflow Help forum by mistake. I'd appreciate it if a mod could delete the corresponding thread in there.

 

Alfred build: 227

OS X version: 10.9.1

 

When using the Open URL action with the URL set only to {query}, Alfred fails silently if the passed arg contains non-ASCII characters.

The following XML, which Alfred accepts and correctly displays in its results list, does nothing when the arg is sent to the Open URL action.

The first item is as returned by Python's xml.etree.ElementTree library, the second I edited back to pure text form to see if that worked (it didn't).

In both cases, Open URL performs perfectly provided {query} is only part of the URL, but fails if {query} is the entire URL.
 

<?xml version="1.0" encoding="utf-8"?>
<items>
<item valid="yes">
<title>Göbekli Tepe - Wikipedia, the free encyclopedia</title>
<subtitle>http://en.wikipedia.org/wiki/Göbekli_Tepe</subtitle>
<arg>http://en.wikipedia.org/wiki/Göbekli_Tepe</arg>
<icon>/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/BookmarkIcon.icns</icon>
</item>
<item valid="yes">
<title>Göbekli Tepe - Wikipedia, the free encyclopedia</title>
<subtitle>http://en.wikipedia.org/wiki/Göbekli_Tepe</subtitle>
<arg>http://en.wikipedia.org/wiki/Göbekli_Tepe</arg>
<icon>/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/BookmarkIcon.icns</icon>
</item>
</items>
Link to comment
Share on other sites

Bug still present in Alfred 2.2 (239) on OS X 10.9.2 (13C64).

 

FWIW, here's the output of the debugger when either of the above items is actioned:

[INFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.openurl' with arg 'http://en.wikipedia.org/wiki/Göbekli_Tepe'
Edited by deanishe
Link to comment
Share on other sites

This is because Alfred pre-encodes {query} strings but doesn't pre-encode full URLs in the same way as when adding a custom web search, anything outside of the {query} part needs pre-encoding.

 

I agree that this isn't ideal - I've added a ticket and may be able to sneak a fix in for this for 2.2 :)

 

Cheers,

Andrew

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...