Global variable truncated if the value contains "&" character

This happened when I linked html image with any control app or blank app then in the control/blank the global variable got truncated.

E.g., [customer]=‘H&M’ then the value becoming ‘H’ in the blank.

Is there any way to resolve this?

Thanks & Regards
Rajibul

[QUOTE=rajibul;35693]This happened when I linked html image with any control app or blank app then in the control/blank the global variable got truncated.

E.g., [customer]=‘H&M’ then the value becoming ‘H’ in the blank.

Is there any way to resolve this?

Thanks & Regards
Rajibul[/QUOTE]

Use ‘H&M’

Hi Dave Prue,

Thank you, but it won’t work!.

[QUOTE=rajibul;35698]Hi Dave Prue,

Thank you, but it won’t work!.[/QUOTE]

Just curious. Try…


$cust = "H&M";
[customer] = "'".$cust."'";

Hi Giu,

Now it becomes 'H !

[QUOTE=rajibul;35702]Hi Giu,

Now it becomes 'H ![/QUOTE]
Try replacing the & with &
EDIT: Actually assuming that works for showing it but I’m not completely certain what you’re wanting to do with the variable.
In case it’s not just for showing it on a page somewhere you might want to make a small converter function to convert all &'s to ‘something’, then one to convert all ‘something’ back to &'s

EDIT2: Actually just starting thinking it might be because your global is being get through GET or POST and I think the syntax for those might use the & for something, so maybe setting the global to a SESSION global would work out better.

EDIT3: Nevermind, I’m unable to reproduce te problem, would you mind giving some more detail as to what all you’re doing with the global variable and maybe what SC version you’re running?

Hi,

Please, explain more how you did.

How you link the application? you use the macro sc_redir or you created a link in side menu Link?

How are you using this global variable?
how you passed and how get the variable?
We wait your reply.


best regard
Netmake Team

Any news about this problem?

John, what should we say ?

Tihs is a character setting problem through all applications

[QUOTE=Gerd Dietrich;36204]John, what should we say ?

Tihs is a character setting problem through all applications[/QUOTE]

In my view, Arthur called for more information about this problem, but no one answered yet.
So I asked if there was any news, because I’m working to solve all the problems of the forum and thus help all of you.

Hi,

We can’t simulate this problem.

can you explain more?

I created two application, a form and other control.
In control application I used in onLoad event echo [variable];
just to see the value.
in form application I use in onLoad [x] = ‘H&M’;

So,I created in the form application a Image HTML field and linked to control application. in parameters, I set that [variable] will get [x] value.

see images:

did you make this way?


Best regard
Netmake team

onloadControl.png

OnloadForm.png

variable.png

result.png