Hi,
In this variable, i would like to add some \ before every '.
Any ideas ?
Thanks!
In this variable, i would like to add some \ before every '.
Code:
string html = "<a href=\"annee-prochaine.html\">Calendrier de l'annee prochaine</a>"
html=html.Replace("'", "\'"); //No change
html=html.Replace("\'", "\'"); //No change
html=html.Replace("\'", "\\'");
//html => <a href=\"annee-prochaine.html\">Calendrier de l\\'annee prochaine</a>
html=html.Replace("\'", @"\'");
//html => <a href=\"annee-prochaine.html\">Calendrier de l\\'annee prochaine</a>
Any ideas ?
Thanks!
Comment