Jump to content

Open URL fragment encoding

Recommended Posts

In my Forecast workflow, sending ""http://forecast.io/#/f/47.6062%2C-122.3321" being sent to the browser. This works in Firefox, but not in Chrome or Safari. From what I can tell, commas don't need to be escaped in fragments, so is this a bug or is there some way to send the unescaped comma through to the browser?

Link to comment

It's not so much a bug as an edge case. Comma is technically a reserved character. It should be encoded when not used with its assigned meaning (whatever that is). Alfred has no way of knowing how the comma is meant.


Ideally, Alfred would have a "don't alter the URL" option, but it doesn't.
If you don't want Alfred to mess with your URLs, your best bet is to use the command-line open command. Replace your Open URL Action with a Run Script one, with the language set to /bin/bash, Escaping set to "Backquotes", "Double Quotes", "Dollars" and "Backslashes", and the contents:

open "{query}"

This will do exactly the same thing as Alfred's Open URL Action but won't alter your URL in any way.

Edited by deanishe
Link to comment

Thanks, that workaround is perfect. In hindsight, that should've been obvious!


And yeah, I forgot that Alfred doesn't know where the `{query}` is in the URL, since the reserved characters are different depending on which part of the URL they're in... oh well!

Link to comment

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
  • Create New...