response_filePath and apostrophe

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

response_filePath and apostrophe

Anibal Escobar
Hello everyone, with a URL such as

http://www.mydomain.com/FONTINA%20D%27AOSTA.htm

the response_filePath tag returns:

/FONTINA DAOSTA.htm

whereas it should be:

/FONTINA D'AOSTA.htm

The apostrophe is missing.  Is there any way to get it back?  I'm using
this in a one file system, so the response path is not an actual file.

Thanks, Anibal


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: response_filePath and apostrophe

Anibal Escobar
Hi, sorry but I forgot to mention that this is Lasso 8.1, MacOSX
10.3.9, Webstar 5.4.  Anibal

On Sep 7, 2006, at 4:20 PM, Anibal Escobar wrote:

> Hello everyone, with a URL such as
>
> http://www.mydomain.com/FONTINA%20D%27AOSTA.htm
>
> the response_filePath tag returns:
>
> /FONTINA DAOSTA.htm
>
> whereas it should be:
>
> /FONTINA D'AOSTA.htm
>
> The apostrophe is missing.  Is there any way to get it back?  I'm
> using this in a one file system, so the response path is not an actual
> file.
>
> Thanks, Anibal
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  
> http://www.listsearch.com/lassotalk.lasso?manage
>


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: response_filePath and apostrophe

Paul Melia

On Sep 7, 2006, at 4:34 PM, Anibal Escobar wrote:

> Hi, sorry but I forgot to mention that this is Lasso 8.1, MacOSX  
> 10.3.9, Webstar 5.4.  Anibal
>
> On Sep 7, 2006, at 4:20 PM, Anibal Escobar wrote:
>
>> Hello everyone, with a URL such as
>>
>> http://www.mydomain.com/FONTINA%20D%27AOSTA.htm
>>
>> the response_filePath tag returns:
>>
>> /FONTINA DAOSTA.htm
>>
>> whereas it should be:
>>
>> /FONTINA D'AOSTA.htm
>>
>> The apostrophe is missing.  Is there any way to get it back?  I'm  
>> using this in a one file system, so the response path is not an  
>> actual file.
>>
>> Thanks, Anibal

[decode_url] will return the characters to the form you are looking  
for within the page/Lasso code.

As for having the URL look the way you desire, I am not sure if you  
have to modify Webstar but I do know that an URL configured as you  
are wishing is not the "standard" format either the W3C or Google  
would recommend.

If you want a good compromise between legibility and search engine  
friendly, I would suggest replacing any spaces or non-alphanumeric  
characters with a -

Example: FONTINA-D-AOSTA.htm

This has worked wonderfully for me in my one-file type setup.

HTH,
Paul

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: response_filePath and apostrophe

Anibal Escobar
> [decode_url] will return the characters to the form you are looking
> for within the page/Lasso code.
>

Do you mean  (decode_URL: (response_filePath))?  When I do this I still
get /FONTINA DAOSTA.htm without the apostrophe, which is the same thing
I get with (response_filePath) on its own.

> As for having the URL look the way you desire, I am not sure if you
> have to modify Webstar but I do know that an URL configured as you are
> wishing is not the "standard" format either the W3C or Google would
> recommend.
>

I'm not trying to shape the URL specifically.  What I'm doing is using
the file path like a search parameter, so it would be the same as
http://www.mydomain.com/oneFile.lasso?myCheese=FONTINA%20D%27AOSTA 
where the name of the cheese in the database is Fontina D'Aosta.  When
doing it like this, (decode_URL) shows the apostrophe.

> If you want a good compromise between legibility and search engine
> friendly, I would suggest replacing any spaces or non-alphanumeric
> characters with a -
>
> Example: FONTINA-D-AOSTA.htm
>
> This has worked wonderfully for me in my one-file type setup.
>
> HTH,
> Paul
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: response_filePath and apostrophe

Paul Melia

On Sep 7, 2006, at 4:58 PM, Anibal Escobar wrote:

> Do you mean  (decode_URL: (response_filePath))?  When I do this I  
> still get /FONTINA DAOSTA.htm without the apostrophe, which is the  
> same thing I get with (response_filePath) on its own.
>
>> As for having the URL look the way you desire, I am not sure if  
>> you have to modify Webstar but I do know that an URL configured as  
>> you are wishing is not the "standard" format either the W3C or  
>> Google would recommend.
>>
>
> I'm not trying to shape the URL specifically.  What I'm doing is  
> using the file path like a search parameter, so it would be the  
> same as <a href="http://www.mydomain.com/oneFile.lasso?myCheese=FONTINA%20D%">http://www.mydomain.com/oneFile.lasso?myCheese=FONTINA%20D% 
> 27AOSTA where the name of the cheese in the database is Fontina  
> D'Aosta.  When doing it like this, (decode_URL) shows the apostrophe.

Anibal,

When you create that standard Lasso URL, Lasso reads the stuff after  
the ? as action_parameters.
Whenever Lasso encounters an action_parameter, according to http://
reference.omnipilot.com/Reference.LassoApp?[Decode_URL], Lasso  
decodes any encoded entities.

Your one-file setup does not use action_parameter, so to get the  
information from the URL into the form you need to perform the  
Database search, you have to create the process yourself.
That is why I suggest using [Decode_URL].

It is my guess that it is webstar that is encoding the URL entities  
(and Apache would do it as well), so you have two choices:

1) modify Webstar so that it does not encode "illegal" entities

2) write/use a routine that grabs the info you need and then decodes  
the encoded entities.
Jason Huck as a great tag for grabbing stuff out of URLS on tagSwap -
 > http://www.tagswap.net/response_url

I then use it to parse the URL, in your case, I would do something  
like this...

// parse URL
var:'request'=(response_url);
var:'name'=(decode_url:(($request->split:'/')->get:5));

result: var:'name'=Fontina D'Aosta


I'll admit I am a bit confused from your description whether you want  
the apostrophe or not, so I hope this makes sense.

HTH,
Paul


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: response_filePath and apostrophe

Bil Corry-3
In reply to this post by Anibal Escobar
Anibal Escobar wrote:

> Hello everyone, with a URL such as
>
> http://www.mydomain.com/FONTINA%20D%27AOSTA.htm
>
> the response_filePath tag returns:
>
> /FONTINA DAOSTA.htm
>
> whereas it should be:
>
> /FONTINA D'AOSTA.htm
>
> The apostrophe is missing.  Is there any way to get it back?  I'm using
> this in a one file system, so the response path is not an actual file.

It works under LP8.5.1/XP/Apache.  [response_filePath] returns:

        /FONTINA D'AOSTA.lasso


- Bil


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: response_filePath and apostrophe

Anibal Escobar
In reply to this post by Paul Melia
> // parse URL
> var:'request'=(response_url);
> var:'name'=(decode_url:(($request->split:'/')->get:5));
>
> result: var:'name'=Fontina D'Aosta
>

This is exactly what I'm doing, but I get

result:  var: 'name'=Fontina DAosta instead.
>
> I'll admit I am a bit confused from your description whether you want
> the apostrophe or not, so I hope this makes sense.
>

What I'm looking for is to be able to keep the apostrophe so that I can
do the proper database search.

With respect to the encoding of the URL in the link, I'm doing it with
the encode_StrictURL tag, so I don't believe Webstar is involved.  But
again, my only issue is with the response page and how to keep the
apostrophe in [response_filePath].

Thanks for your help.  Anibal

> HTH,
> Paul
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: response_filePath and apostrophe

Anibal Escobar
In reply to this post by Bil Corry-3
I just tried it on Lasso 8.5.0/MacOSX 10.3.9/Apache and I got

/FONTINA D'AOSTA.htm

So either it's a Webstar thing or a Lasso 8.1 thing.

Any thoughts on which one?

On Sep 7, 2006, at 5:38 PM, Bil Corry wrote:

> Anibal Escobar wrote:
>> Hello everyone, with a URL such as
>> http://www.mydomain.com/FONTINA%20D%27AOSTA.htm
>> the response_filePath tag returns:
>> /FONTINA DAOSTA.htm
>> whereas it should be:
>> /FONTINA D'AOSTA.htm
>> The apostrophe is missing.  Is there any way to get it back?  I'm
>> using this in a one file system, so the response path is not an
>> actual file.
>
> It works under LP8.5.1/XP/Apache.  [response_filePath] returns:
>
> /FONTINA D'AOSTA.lasso
>
>
> - Bil
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:  
> http://www.listsearch.com/lassotalk.lasso?manage
>


------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: response_filePath and apostrophe

jasonhuck
Most likely, it's the web server. I found that there were certain
characters that Apache in particular would always encode, even if you
had encoded the information already yourself before passing it off. As
a result I ended up creating my own replacement codes for certain
characters. The result was this set of tags:

http://tagswap.net/encode_urlpath
http://tagswap.net/decode_urlpath

I must have had issues with apostrophes also, because I see I am
replacing them with a backtick in the encoding. So, maybe give these
tags a try.

IMPORTANT: Don't copy the source code out of the preview window, or
the tags will NOT work as expected. Use the download button to make
sure you get clean copies of the tags.

- jason








On 9/7/06, Anibal Escobar <[hidden email]> wrote:

> I just tried it on Lasso 8.5.0/MacOSX 10.3.9/Apache and I got
>
> /FONTINA D'AOSTA.htm
>
> So either it's a Webstar thing or a Lasso 8.1 thing.
>
> Any thoughts on which one?
>
> On Sep 7, 2006, at 5:38 PM, Bil Corry wrote:
>
> > Anibal Escobar wrote:
> >> Hello everyone, with a URL such as
> >> http://www.mydomain.com/FONTINA%20D%27AOSTA.htm
> >> the response_filePath tag returns:
> >> /FONTINA DAOSTA.htm
> >> whereas it should be:
> >> /FONTINA D'AOSTA.htm
> >> The apostrophe is missing.  Is there any way to get it back?  I'm
> >> using this in a one file system, so the response path is not an
> >> actual file.
> >
> > It works under LP8.5.1/XP/Apache.  [response_filePath] returns:
> >
> >       /FONTINA D'AOSTA.lasso
> >
> >
> > - Bil
> >
> >
> > ------------------------------
> > Lasso Support: http://support.omnipilot.com/
> > Search the list archives: http://www.listsearch.com/lassotalk.lasso
> > Manage your list subscription:
> > http://www.listsearch.com/lassotalk.lasso?manage
> >
>
>
> ------------------------------
> Lasso Support: http://support.omnipilot.com/
> Search the list archives: http://www.listsearch.com/lassotalk.lasso
> Manage your list subscription:
> http://www.listsearch.com/lassotalk.lasso?manage
>


--
Find and Share Free Lasso Custom Tags at tagSwap.net!
Download hundreds of open source Lasso custom tags, and post your own
for others to use. RSS feeds track the newest and most popular tags.
http://tagSwap.net/

------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage