URL into alias?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
This target works in a shortcut.

Code:
http://forecast.weather.gov/MapClick.php?CityName=Syracuse&state=NY&site=BGM&textField1=43.0446&textField2=-76.1459&e=0
To use it in an alias, I escaped the ampersands thus:

Code:
http://forecast.weather.gov/MapClick.php?CityName=Syracuse^&state=NY^&site=BGM^&textField1=43.0446^&textField2=-76.1459^&e=0
But when I use the alias or simply issue the escaped version at the command prompt, it doesn't work.

How do I get it into an alias or even simply issue it at the command prompt?
 

samintz

Scott Mintz
May 20, 2008
1,232
11
Solon, OH, USA
#2
Quote it. That worked for me.

"
http://forecast.weather.gov/MapClick.php?CityName=Syracuse&state=NY&site=BGM&textField1=43.0446&textField2=-76.1459&e=0
"

-Scott

vefatica <> wrote on 01/10/2011 04:12:02 PM:


> This target works in a shortcut.
>
>
> Code:
> ---------
> http://forecast.weather.gov/MapClick.php?
>
CityName=Syracuse&state=NY&site=BGM&textField1=43.0446&textField2=-76.1459&e=0

> ---------
> To use it in an alias, I escaped the ampersands thus:
>
>
> Code:
> ---------
> http://forecast.weather.gov/MapClick.php?
> CityName=Syracuse^&state=NY^&site=BGM^&textField1=43.
> 0446^&textField2=-76.1459^&e=0
> ---------
> But when I use the alias or simply issue the escaped version at the
> command prompt, it doesn't work.
>
> How do I get it into an alias or even simply issue it at the command
prompt?
 
#3
On Mon, 10 Jan 2011 16:26:24 -0500, samintz <> wrote:

|Quote it. That worked for me.
|
|"
|http://forecast.weather.gov/MapClick.php?CityName=Syracuse&state=NY&site=BGM&textField1=43.0446&textField2=-76.1459&e=0
|"

OK, I'll try that in a minute. But what's really odd is if I just type the URL
from the shortcut at the prompt the ampersands are treated as command separators
(that's expected). But if I type the URL with escaped ampersands, the escape
characters wind up being sent to the internet. Network trace snippet:

Code:
P.......GET./Map
Click.php?CityNa
me=Syracuse^&sta
te=NY^&site=BGM^
&textField1=43.0
446^&textField2-76.1459^&e=0.HT
If the escaping keeps TCC from treating the ampersands as command separators,
then shouldn't they be removed?

Tried it. Quoting works. Thanks.
 

rconn

Administrator
Staff member
May 14, 2008
10,292
90
#4
> OK, I'll try that in a minute. But what's really odd is if I just type
the URL

> from the shortcut at the prompt the ampersands are treated as command
> separators (that's expected). But if I type the URL with escaped
ampersands,

> the escape characters wind up being sent to the internet.
An URL is not a command, and does not get parsed (and escape characters
removed) like a command.

As the help says, all URLs should be double quoted. The parser can
sometimes figure it out without the quotes, but you're skating on thin ice.

Rex Conn
JP Software
 
#5
On Tue, 11 Jan 2011 11:55:53 -0500, rconn <> wrote:

|---Quote---
|> OK, I'll try that in a minute. But what's really odd is if I just type
|---End Quote---
|the URL
|
|
|---Quote---
|> from the shortcut at the prompt the ampersands are treated as command
|> separators (that's expected). But if I type the URL with escaped
|---End Quote---
|ampersands,
|
|
|---Quote---
|> the escape characters wind up being sent to the internet.
|---End Quote---
|An URL is not a command, and does not get parsed (and escape characters
|removed) like a command.
|
|As the help says, all URLs should be double quoted. The parser can
|sometimes figure it out without the quotes, but you're skating on thin ice.

Rex, it often happens that you reply quoting the OP in little chunks with your
comments in between (no complaint, I like that style). But when you do, the
quoting is all screwed up, with **most** of each quote actually inside the quote
indicators, and the last little bit outside, on the next line, not quoted. It
looks bad enough on the web forum and makes the plain text emails very hard to
read. How do you manage to to that? I don't think I could if I tried.