ExternalEval and Url Error

Hi I have :

Application.ExternalEval("window.open('http://domain.com/link.mstrURL+"','_blank')");

and in my link.mstrURL, I have my specific link.

It works well but it seems that when I have mstrURL with a ’ in the string it fails, how can I avoid that ?

Thanks a lot !

I added a \ in front of my ’ and it seems to work but is there a function to do that automatically ?