简体   繁体   中英

How to escape the forward slash in the string in javascript? C# web api not recognizing the forward slash

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]"

您可以尝试使用以下替换功能来删除您的转义序列:

str.replace(/\//g, "");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM