Entwickler-Ecke

Programmiersprachen (Client) - JS-Äquivalent zu PHP-stripslashes


Marco D. - Sa 06.10.07 15:15
Titel: JS-Äquivalent zu PHP-stripslashes
Gibt es in JS eine Funktion, die genau dasselbe wie stripslashes() in PHP macht?


Lannes - Sa 06.10.07 15:42

Hallo,

passt das?:
javascript.about.com: Addslashes and Stripslashes [http://javascript.about.com/library/bladdslash.htm]


Marco D. - Sa 06.10.07 15:46

Was soll das denn sein? Ich verstehe die beiden Argumente nicht :nixweiss:
str=str.replace(/\\'/g,'\'');


Lannes - Sa 06.10.07 15:51

Hallo,

reguläre Ausdrücke :arrow: http://de.selfhtml.org/javascript/objekte/string.htm#replace


Marco D. - Sa 06.10.07 15:53

Gut danke, schaue ich mir mal an :!: ;)