ShowURL does not work long URL

I have this working url:

Now I would open this with ShowRL(url):
dim url as string = "‘1’=“MAS100000289442”
Firefox is starting, but the url will not shown. I the url field of firefox in only a shorter string:
When I copy the url like this:
dim MyClip as new clipboard
MyClip.text = url
And paste the clipboard into Firefox, the url will be shown. I also try to convert the url string with “url = DecodeURLComponent(url)”, but this also does not work.

You have to escape the double quotes:

... 10='1'="MAS100000289442"

… should be:

... 10='1'=""MAS100000289442""

I just tried with a very long URL ; no problems with Firefox on Mac or Windows.

I have changed the string
And now it works.

EncodeURLComponent is your friend

Use it for each of the components in the URL and they will be escaped properly.

Something like
Dim QuotedString as String = “”“QuotedString”"" ’ = “QuotedString”

dim url as string

url = “http://myserver/?yada1="+EncodeURLComponent("Spaced String”)+"&yada2="+EncodeURLComponent(QuotedString)

url = http://myserver/?yada1=Spaced%20String&yada2="QuotedString"

It is much easier to encodeURLComponent the whole URL string. If it is already escaped, it will not hurt.

That wouldn’t work with items containing quotes, equals, ampersands, semicolons, or anything else containing special html chars

Encoding the individual parts means that the server can use Request.GET(“item”) and correctly get the part of the URL with item=%22Quoted%22 to give item = “Quoted”

dim vendor as string = “Marks & Spenders”
dim year as string = “2015”
dim url as string = “http://myserverurl/?"
dim arg as string = “vendor=”+EncodeURLComponent(vendor)+”&year="+EncodeURLComponent(year)


At the server end, Request.get(“vendor”) correctly gives Marks & Spenders

If you encoded the whole thing how would you be able to separate each part out?



[quote=222970:@Lee Badham]If you encoded the whole thing how would you be able to separate each part out?

Just try. A URL encoded URL is decoded automatically by any Web app, and even the most elementary HTML page. Encoding individually each parameter is unnecessary extra work.

It did not work when I used Xojo Web edition.

Web app with in the HandleSpecialURL

Request.Print request.GetParameter(“vendor”)
Request.Print request.GetParameter(“year”)
return true

Encoding each part gives

And correctly outputs Marks & Spenders2015

Encoding the whole string gives

This gives me nothing


I thought you were referring to a normal app, where it works perfectly, as expected.

In HandleSpecialURL indeed it does not work. That is a bug IMO.