Any way to pass a url with a ~

Please post general questions about WebLobby here
deanb2
Senior Member
Senior Member
Posts: 181
Joined: Tue Feb 14, 2006 7:21 pm
Contact:

Any way to pass a url with a ~

Postby deanb2 » Sat Jun 07, 2008 11:53 am

I'm trying to do something with the CNN headlines and WebLobby, but the CNN URL's have a ~ character in them. ~ is legal in a URL, but it is also the separator in most ML commands, so the URL gets truncated at the first ~.

I have tried passing the URL via Web|Navigate and also by putting the URL in a variable and using that variable in the label field of the WebLobby button.

When I use a variable in the label field of the WebLobby button, it substitutes the variable when I save the page, so it gets truncated at that point.

Dean

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Postby bigDvette » Tue Jun 10, 2008 11:23 am


deanb2
Senior Member
Senior Member
Posts: 181
Joined: Tue Feb 14, 2006 7:21 pm
Contact:

Postby deanb2 » Tue Jun 10, 2008 12:16 pm

Saw that post already, but it deals with a URL that is known beforehand, not one that is dynamic, such as the _link variables created by the MLRSS plugin. The CNN links have ~ characters in them.

I suppose that a could write a script that generated the redirect file, but that would get ugly quick.


Dean

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Tue Jun 10, 2008 3:59 pm

Dean,

We're testing a few ideas of using an MLScript to replace the tilde with a URL encoded character: %7E

Then use the MLCMD to send the Web|Navigate~{{url}}

It doesn't seem to work if it goes through MLServer but does if it is in the MLCmd line.
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Wed Jun 11, 2008 1:43 pm

Perhaps not the ultimate solution but it does work.

You'll need the MLScripts plugin and just import the attached script (unzip first).

Then you'll need to build a server rule for each variable you want to url encode.

So create a rule for example for the variable: mlrss_feed_001_item_001_link

Whenever mlrss_feed_001_item_001_link changes value
Then MLScript|Replace~Tilde~mlrss_feed_001_item_001_link

This will replace all the tilde's in the varibles with a %7E.

Then in MainLobby, you'll need to use the MLCmd line (NOT MLSERVECMD) to send: Web|Navigate~{{mlrss_feed_001_item_001_link}}

Hope that helps.
Web|Navigate
You do not have the required permissions to view the files attached to this post.
Mario Cascio

Cinemar, Inc.

http://www.cinemaronline.com

kirkfrey
Expert
Expert
Posts: 759
Joined: Wed Jan 12, 2005 10:55 am
Contact:

Postby kirkfrey » Tue May 12, 2009 10:03 pm

Any updated way to deal with this?
Kirk

Just trying to figure it out...


Return to “WebLobby Questions & Answers”

Who is online

Users browsing this forum: No registered users and 1 guest