| character in @Urlopen modified to %7

We are currently upgrading to R6 but I need to maintain compatability between R5 and R6 without using R6 functionality. I have a shared action the allows the user to preview their work in the browser which works fine with an R5 client on an R5 server. But using an R6 client on an R5 server produces a 404 as the url is encoded differently.

R5 produces: http://web2.mydomain.com/db/content.nsf/Preview?OpenForm&Section+Breadcrumb~Subsection+Breadcrumb|67DB1CD63B7E73C58525700A004DCCB0?OpenDocument&login

R6 client on R5 server produces: http://web2.mydomain.com/db/content.nsf/Preview?OpenForm&Section+Breadcrumb~Subsection+Breadcrumbv7DB1CD63B7E73C58525700A004DCCB0?OpenDocument&login

What is the easiest way to rectify this without any R6 functionality and have it work on both clients?

Here is the code in the button:

db:=@Subset(@DbName;-1);

server:=@Name([CN];@DbName);

@If(Form=“SecPage”;@URLOpen(“http://”+server+“.mydomain.com/db/content.nsf/Pages/”+@Text(@DocumentUniqueID)+“?OpenDocument”);

Form=“ccSpotlight”;@URLOpen(“http://”+server+“.mydomain.com/db/content.nsf/Pages/”+@Text(@DocumentUniqueID)+“?OpenDocument”);Form=“SHP” & Status=3;

@URLOpen(“http://”+server+“.mydomain.com/db/content.nsf/Preview?OpenForm&”+@ReplaceSubstring(Site;" “;”+“)+”~Home?OpenDocument&login");

Form=“SHP” & Status!=3;

@URLOpen(“http://”+server+“.mydomain.com/db/content.nsf/Preview?OpenForm&”+@ReplaceSubstring(Site;" “;”+“)+”~Home|“+@Text(@DocumentUniqueID)+”?OpenDocument&login");

@URLOpen(“http://”+server+“.mydomain.com/db/content.nsf/Preview?OpenForm&Section+Breadcrumb~Subsection+Breadcrumb|”+@Text(@DocumentUniqueID)+“?OpenDocument&login”))

Subject: | character in @Urlopen modified to %7

Try assembling the URLs in the HTML Head content section of your form as a javascript function/variable then call the function/variable in your button (as javascript/onsubmit)e.g. in your HTLM Head content:

db:=…;

aURL := @If( ;“http://…|…”; “http://…~…”);

“<SCRIPT Language="JavaScript">” + @NewLine +

“var aURL = '” + aURL + “';” + @NewLine +

“”

Then in your button (as javascript):

location.href=aURL;

return false;

Try avoid using the @URLOpen in R6 with special characters

HTH