mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
Merge pull request #1151 from ePaul/feature/1146-trim-whitespaces-before-escaping
trim strings before escaping
This commit is contained in:
commit
dfb87abe3a
@ -126,6 +126,7 @@ public class DefaultCodegen {
|
||||
// override with any special text escaping logic
|
||||
public String escapeText(String input) {
|
||||
if (input != null) {
|
||||
input = input.trim();
|
||||
String output = input.replaceAll("\n", "\\\\n");
|
||||
output = output.replace("\"", "\\\"");
|
||||
return output;
|
||||
|
Loading…
Reference in New Issue
Block a user