Subject: URL not accepted properly

From: Mike Miller <[email-masked]>
Date: Mon, 28 Feb 2000 13:46:26 -0600 (CST)

I get many URLs sent to me Nando that look like this:

http://www.nando.net/noframes/story/0,2107,500174350-500226187-501065781-0,00.html

For some reason, even though almost all other URLs work for me in pine,
these always return an error message when I enter them.

I think the problem is caused by commas in the file name.  I'm running
pine 4.21 on Solaris 2.6.  Here is the relevant section of my .pinerc:

# List of programs to open Internet URLs (e.g. http or ftp references).
url-viewers="/opt/netscape/netscape -noraise -remote openURL\\(_URL_,\\ new-window\\)"

Is it possible to do this better, e.g., putting _URL_ in single quotes, or
somethign like that?

Thanks in advance for any suggestions!

Mike

-- 
Michael B. Miller
University of Missouri--Columbia
http://taxa.psyc.missouri.edu/~mbmiller/

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: David Dyck <[email-masked]>
Date: Mon, 28 Feb 2000 12:07:58 -0800 (PST)

> Is it possible to do this better, e.g., putting _URL_ in single quotes, or

   I don't think this will help, as it is netscape will be still confused

my url-viewers like invokes a wrapper script
    url-viewers="/home/dcd/bin/urln '_URL_'"

It's a perl script that changes the commas to %2C like
    s/,/%2C/g;

When I get into netscape the url is

    http://www.nando.net/noframes/story/0%2C2107%2C500174350-500226187-501065781-0%2C00.html

---

From: Mike Miller <[email-masked]>
Date: Tue, 29 Feb 2000 12:48:26 -0600 (CST)

> It's a perl script that changes the commas to %2C like

Good idea.  For those not familiar with this concept, see here:
http://www.december.com/html/spec/esccodes.html

Then Ed Arnold <[email-masked]> sent me an sh script that evokes netscape.  
Ed's script worked on his Solaris 7 system, but it gave me the same
problem with commas that I was having before.  So I combined David's
string substitution idea (using sed instead of perl) with Ed's script and
came up with something that worked for me.  I'm really happy with this
solution because it seems to work every time.  Thanks very much to both of
you for helping with this!

The script is appended below.  To make it work, edit the path to netscape,
copy it to a directory such as /usr/local/bin and name it 'ns' (for
example), chmod a+x ns, and change the url-viewers line in your .pinerc
appropriately, for example:

# List of programs to open Internet URLs (e.g. http or ftp references).
url-viewers=/usr/local/bin/ns

Regards,

Mike

Michael B. Miller

--------------------------------------------------------------------------
#!/bin/sh
# short script to invoke netscape from within pine as a background
# process, so pine can continue.  Only arg is the URL.
# Author: Ed Arnold <[email-masked]> , but modified by Mike Miller

 NETSCAPE=/usr/local/bin/netscape
 URL=`echo $1 | sed 's/,/%2C/g'`

 if [ -h $HOME/.netscape/lock ]; then
   $NETSCAPE -noraise -remote openURL\("$URL"\,new_window\) &
 else
   $NETSCAPE "$URL" &
 fi