Jump to content
deanishe

Open URL action fails with non-ASCII {query} as URL

Recommended Posts

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

This feels like a bug.

 

If you use a Run Script action/output (language: /bin/bash; escape: double quotes, backslashes) with the following code:

open "{query}"

…everything works perfectly, regardless of encoding.

Share this post


Link to post

I'm 99.9% certain it's a bug.

The encoding is 100% correct: Alfred accepts the XML (indeed it would work with item 1 even if it were ASCII-encoded).

That Open URL works fine if {query} is part of the URL, but fails if it's the entire URL squarely points the finger in Alfred's direction, IMO. It looks like Alfred follows a different code path if {query} is the entire URL (the UI options then become greyed out).

Thar be bugs (well a bug), methinks.

Share this post


Link to post

Why has this been moved from the Bugs forum to the Workflow Help forum?

 

It's a bug report, not a request for help!

 

I suspect Andrew might think I don't know my text encoding from my elbow…

Edited by deanishe

Share this post


Link to post

Why has this been moved from the Bugs forum to the Workflow Help forum?

 

It's a bug report, not a request for help!

 

I suspect Andrew might think I don't know my text encoding from my elbow…

 

For what it's worth, this was in "Workflow Help & Questions" when I replied to it. On top of that, I seriously doubt Andrew would move a post without replying to inform the original post's author.

Share this post


Link to post

Hmm, I'm pretty sure I posted it in the Bug Report forum, but as you say, I don't think Andrew would move it without saying anything, either, and it certainly wouldn't be the first time I done messed up…

 

I guess I'll toddle off and post it in the Bug Report forum: it's doing no good in here.

Edited by deanishe

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...