mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-19 04:17:44 +00:00
fix bug escaping backspace character
This commit is contained in:
@@ -9,7 +9,7 @@ function escapeString(str) {
|
||||
return str
|
||||
.replace(/\\/g, '\\\\') // Escape backslashes
|
||||
.replace(/"/g, '\\"') // Escape double quotes
|
||||
.replace(/\b/g, '\\b') // Escape backspace
|
||||
.replace(/[\b]/g, '\\b') // Escape backspace (NOTE: [\b] not \b)
|
||||
.replace(/\f/g, '\\f') // Escape formfeed
|
||||
.replace(/\n/g, '\\n') // Escape newlines
|
||||
.replace(/\r/g, '\\r') // Escape carriage returns
|
||||
|
||||
Reference in New Issue
Block a user