0

I have a link which has navigateToBusiness("check & ' ""). Due to this double quote, script is not getting called. The value passed check & ' " is dynamic.

Please help. Thanks in advance.

Vaandu
  • 4,857
  • 12
  • 49
  • 75

2 Answers2

1

You can escape special characters with a leading \

navigateToBusiness("check & \' \"")
jAndy
  • 231,737
  • 57
  • 305
  • 359
  • Thank for your response Andy. As the passed value is dynamic (from java), I tried `name.replace("\"","\\\"").replace("'", "\'")`. But still it generated as `check & ' "`. Do you have any idea? if so, please help. – Vaandu Aug 27 '12 at 11:37
0

You may need to escape the quote,

Read more here: Escape quotes in JavaScript

Hopefuly this helps

Community
  • 1
  • 1
Lemex
  • 3,772
  • 14
  • 53
  • 87