Skip to content

Commit

Permalink
revert encodding of ' and /
Browse files Browse the repository at this point in the history
The problem could exist in POSTing of edited data to the server.
Probably one should introduce additional option, which allows to post
encoded data or not. Currently jqGrid POST encoded data if
`autoencode:true` is set. If could be wrong way at least in two cases:
one use JSON serialization `content-type: application/json`, one send
XML data or if one use `content-type: application/x-www-form-urlencoded`
and jQuey.ajax makes HTML encoding automatically.

Before exact analysing the problem, I revert previous changes.
  • Loading branch information
OlegKi committed Nov 22, 2015
1 parent a520cd2 commit 284c13d
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 61 deletions.
8 changes: 4 additions & 4 deletions js/grid.base.js
Expand Up @@ -554,8 +554,8 @@
String(value)
.replace(/>/g, ">")
.replace(/&lt;/g, "<")
.replace(/&#x27;/g, "'")
.replace(/&#x2F;/g, "\/")
//.replace(/&#x27;/g, "'")
//.replace(/&#x2F;/g, "\/")
.replace(/&quot;/g, "\"")
.replace(/&amp;/g, "&");
},
Expand All @@ -566,8 +566,8 @@
String(value)
.replace(/&/g, "&amp;")
.replace(/\"/g, "&quot;")
.replace(/\'/g, "&#x27;")
.replace(/\//g, "&#x2F;")
//.replace(/\'/g, "&#x27;")
//.replace(/\//g, "&#x2F;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;");
},
Expand Down

0 comments on commit 284c13d

Please sign in to comment.