Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Sep 1999 16:38:06 -0400 (EDT)
From:      Adrian Filipi-Martin <adrian@ubergeeks.com>
To:        Mark Ovens <mark@dogma.freebsd-uk.eu.org>
Cc:        Dag-Erling Smorgrav <des@flood.ping.uio.no>, Dirk GOUDERS <hank@musashi.et.bocholt.fh-ge.de>, Wes Peters <wes@softweyr.com>, chat@freebsd.org
Subject:   Re: More press
Message-ID:  <Pine.BSF.3.96.990912163449.290N-100000@lorax.ubergeeks.com>
In-Reply-To: <19990912203330.A668@marder-1>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 12 Sep 1999, Mark Ovens wrote:

> On Sun, Sep 12, 1999 at 02:42:58PM -0400, Adrian Filipi-Martin wrote:
> > On 12 Sep 1999, Dag-Erling Smorgrav wrote:
> > 
> > > Dirk GOUDERS <hank@musashi.et.bocholt.fh-ge.de> writes:
> > > > Oh, sorry -- my "browse-url-at-mouse" function made
> > > > 
> > > > http://www.zdnet.com/zdtv/screensavers/answerstips/story/02c36562c23246242c00.html
> > > > 
> > > > of it...
> > > 
> > > Netscape uses commans to separate parameters to the OpenURL command.
> > > Fortunately, the API is open and documented, so there's nothing to
> > > stop someone from writing a small command-line util that does the
> > > equivalent of "netscape -remote" except faster and better.
> > 
> > 	Note, I redirected this to -chat.
> > 
> > 	Try the following:
> > 
> > : adrian@lorax; cat ~/bin/netscape_r 
> > #!/bin/sh
> > if [ $# != 1 ]; then
> >   echo "netscape_r URL"
> >   exit 1;
> > fi
> > URL=$(echo $1 | sed -e 's/,/%2c/g')
> > exec /usr/local/bin/netscape -remote "openURL(${URL})"
> > 
> 
> Do you happen to know how to pass URLs containing commas to Netscape
> this way?

	Read the sed command in the script.  Yes, it handles commas just
fine.  They are correctly encoded with their hex character number.


> I use urlview with this in ~/.urlview:
> 
> COMMAND netscape -remote 'openURL(%s)'
> 
> however Netscape barfs on URLs that contain things like:
> 
> 30999847,0,19,1.html
> 
> the kind of thing you see in zdnet URLs for instance. I've tried
> wrapping ``%s'' in both double and single quotes (not at the same
> time ;-) ) but they just get passed literally.
> 
> The problem seems to be with Netscape, not urlview.

	The problem is with the urlview script.  Netscape is just receiving
a single string via the -remote option, "open......)".  The embedded
commas look like argument separators to netscape for the openURL()
function.

cheers,

	Adrian
--
[ adrian@ubergeeks.com -- Ubergeeks Consulting -- http://www.ubergeeks.com/ ]



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990912163449.290N-100000>