issue-249-formatLiteral function escapes only the first occurrence of a single quote instead of all of them
diff --git a/JSLib/src/odata-json-light.js b/JSLib/src/odata-json-light.js
index 9a10601..a0ac752 100644
--- a/JSLib/src/odata-json-light.js
+++ b/JSLib/src/odata-json-light.js
@@ -832,7 +832,7 @@
/// <returns type="string">Value after formatting</returns>
value = "" + formatRowLiteral(value, type);
- value = encodeURIComponent(value.replace("'", "''"));
+ value = encodeURIComponent(value.replace(/'/g, "''"));
switch ((type)) {
case "Edm.Binary":
return "X'" + value + "'";