-2

How do i escape forward slash in javascript ? string str= "[B]Hello How are you[/B]". This is the string i want to pass from client side to c# web api. C# web api not recognizing forward slash in the string. - "[REM][TB]Hello How are you[%2FTB]"

Dhello
  • 1

1 Answers1

0

You can try with below replace function to remove your escape sequences:

str.replace(/\//g, "");
ashish bandiwar
  • 378
  • 1
  • 3
  • 12