Cleaning up stack URLs

Mark Smith mark at maseurope.net
Tue Apr 24 14:46:05 EDT 2007


I think UrlEncode is exactly what you're after, isn't it?

from the docs:

Returns a string that has been transformed so that it can be posted  
to an HTTP server as a URL.

Best,

Mark

On 24 Apr 2007, at 19:18, Devin Asay wrote:

> I'm working on a stack that launches stacks from the web with 'go  
> stack URL'.
>
> I know there are certain characters that are illegal or unsafe in  
> URL strings. (See http://tools.ietf.org/html/rfc1738) These include  
> space, quote and a number of others. Most web browsers  
> automatically escape these characters for you, so, e.g., a space is  
> converted to '%20' before the browser sends the request to the server.
>
> I'm about to start writing a function that checks a potential stack  
> URL for illegal and unsafe characters and converts them to escape  
> sequences, but I don't want to reinvent the wheel if such a thing  
> already exists.
>
> Am I right that there is no equivalent functionality built into  
> Rev? I know about URLEncode(), of course, but that serves a  
> different purpose--formatting strings for POSTing, rather than  
> formatting strings for retrieving files from a server (a GET  
> request?) Am I understanding this correctly?
>
> A related issue is, are there characters that are disallowed as  
> filenames for rev stackfiles? I can't find any such list anywhere.  
> I suppose this would be determined by the host OS?
>
> Thanks.
>
> Devin
>
> Devin Asay
> Humanities Technology and Research Support Center
> Brigham Young University
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list