Jump to content
deanishe

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

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>

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

 

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

 

 

If you update to 2.2 pre-release b240, this should now be fixed :)

Share this post


Link to post
Share on other sites

×
×
  • Create New...