realbasic-nug
[Top] [All Lists]

Re: HTML Encoding code?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: HTML Encoding code?
From: Tom Benson <tombenson at mac dot com>
Date: Wed, 31 Jan 2007 09:25:59 +1100
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <A90D5E2B-7654-4377-865F-25C50DBB3A0A at mac dot com>
Try the EncodeURLComponent Function.

From the Language Reference:

Dim s as String
s=EncodeURLComponent("www.Bob&Ray.com")   //returns "www.bob%26ray.com"

Cheers,
Tom


On 31/01/2007, at 9:19 AM, Guyren Howe wrote:

Bizarrely, I can't locate any code for REALbasic that converts characters intended for a URL into HTML escape sequences as need be. eg space into %20.

Bizarrely, also, there doesn't appear to be a built-in function to do it.

I could roll my own, but surely someone has already done this?

Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com

REALbasic, PHP, Ruby/Rails, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>