Selector does not recognize espaced ampersand

Hi everyone. I have a string that I use in the aaname of a selector and this string contains an ampersand (&). I did try to change the ampersand to the escaped version by doing variable.ToString.Replace(“&”, “&”). It worked before, but now I am receiving aaname=‘Contents&’

So basically I think the & was replaced to & by my code, and then the & was changed to &amp by the selector and it cannot find my value.

Any thoughts?

Nevermind. For some reason it works when I remove the Replace. Maybe because of an update.

@jepviterbo Better to use wildcard * in place of & sign.