Skip to content

Commit 5877930

Browse files
committed
#281 Default values must be escaped. Thanks to elincognito.
1 parent 797b269 commit 5877930

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

EntityFramework.Reverse.POCO.Generator/EF.Reverse.POCO.Core.ttinclude

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,8 @@
11061106
Default = string.Format("\"{0}\"", Default);
11071107
if(Default.Contains('\\') || Default.Contains('\r') || Default.Contains('\n'))
11081108
Default = "@" + Default;
1109+
else
1110+
Default = string.Format("\"{0}\"", Default.Substring(1, Default.Length - 2).Replace("\"", "\\\"")); // #281 Default values must be escaped if contain double quotes
11091111
break;
11101112

11111113
case "long":

0 commit comments

Comments
 (0)