NodeJS generator - Harken to the the warnings ...

2 types of warnings are emitted in bulk whenever using the nodeJS generator.

I did some guesswork: since JS is a c-type language like C# and Java - I looked there for reference, and followed their example.
This commit is contained in:
osher
2016-08-01 13:40:29 +03:00
committed by GitHub
parent f5e20b4e88
commit 30776d75a9

View File

@@ -320,4 +320,14 @@ public class NodeJSServerCodegen extends DefaultCodegen implements CodegenConfig
return removeNonNameElementToCamelCase(name, "[-:;#]");
}
@Override
public String escapeUnsafeCharacters(String input) {
return input.replace("*/", "*_/").replace("/*", "/_*");
}
@Override
public String escapeQuotationMark(String input) {
// remove " to avoid code injection
return input.replace("\"", "");
}
}