Repository: olingo-odata3-js Updated Branches: refs/heads/master da25dc30f -> d0873e5dd
issue-249-formatLiteral function escapes only the first occurrence of a single quote instead of all of them Project: http://git-wip-us.apache.org/repos/asf/olingo-odata3-js/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata3-js/commit/d0873e5d Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata3-js/tree/d0873e5d Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata3-js/diff/d0873e5d Branch: refs/heads/master Commit: d0873e5dded38d8b149f151d9ae38afcc3b8d48e Parents: da25dc3 Author: unknown <[email protected]> Authored: Tue Apr 29 14:44:42 2014 +0800 Committer: unknown <[email protected]> Committed: Tue Apr 29 14:44:42 2014 +0800 ---------------------------------------------------------------------- JSLib/src/odata-json-light.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata3-js/blob/d0873e5d/JSLib/src/odata-json-light.js ---------------------------------------------------------------------- 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 + "'";
