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,817
  • 12
  • 47
  • 75

2 Answers2

1

You can escape special characters with a leading \

navigateToBusiness("check & \' \"")
jAndy
  • 223,102
  • 54
  • 301
  • 354
  • 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,734
  • 14
  • 50
  • 87