Skip to content

Commit

Permalink
Removing unnecessary encodeURIComponent and decodeURIComponent calls (f…
Browse files Browse the repository at this point in the history
…ixes #6)
  • Loading branch information
TrevorBurnham committed May 10, 2012
1 parent c2d24f5 commit 3be205d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions jquery.preview.full.js
Expand Up @@ -2160,8 +2160,8 @@ function Preview(elem, options) {
}
obj.image_url = v;
}
else{
v = obj.hasOwnProperty(n) && obj[n] ? encodeURIComponent(obj[n]): '';
else {
v = obj[n];
}

var d = {
Expand Down Expand Up @@ -2243,7 +2243,7 @@ function Preview(elem, options) {
// input that we should look for and compare values. If they are the
// same we will ignore.
var original_url = this.form.find('#id_original_url').val();
if (original_url === encodeURIComponent(url)) {
if (original_url === url) {
return true;
}

Expand Down Expand Up @@ -2292,7 +2292,7 @@ function Preview(elem, options) {
function (i, e) {
var n = $(e).attr('name');
if (n !== undefined) {
data[n] = decodeURIComponent($(e).val());
data[n] = $(e).val();
}
});
// Clears the Selector.
Expand Down
2 changes: 1 addition & 1 deletion jquery.preview.full.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions jquery.preview.js
Expand Up @@ -903,8 +903,8 @@ function Preview(elem, options) {
}
obj.image_url = v;
}
else{
v = obj.hasOwnProperty(n) && obj[n] ? encodeURIComponent(obj[n]): '';
else {
v = obj[n];
}

var d = {
Expand Down Expand Up @@ -986,7 +986,7 @@ function Preview(elem, options) {
// input that we should look for and compare values. If they are the
// same we will ignore.
var original_url = this.form.find('#id_original_url').val();
if (original_url === encodeURIComponent(url)) {
if (original_url === url) {
return true;
}

Expand Down Expand Up @@ -1035,7 +1035,7 @@ function Preview(elem, options) {
function (i, e) {
var n = $(e).attr('name');
if (n !== undefined) {
data[n] = decodeURIComponent($(e).val());
data[n] = $(e).val();
}
});
// Clears the Selector.
Expand Down
2 changes: 1 addition & 1 deletion jquery.preview.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/preview.js
Expand Up @@ -181,8 +181,8 @@ function Preview(elem, options) {
}
obj.image_url = v;
}
else{
v = obj.hasOwnProperty(n) && obj[n] ? encodeURIComponent(obj[n]): '';
else {
v = obj[n];
}

var d = {
Expand Down Expand Up @@ -264,7 +264,7 @@ function Preview(elem, options) {
// input that we should look for and compare values. If they are the
// same we will ignore.
var original_url = this.form.find('#id_original_url').val();
if (original_url === encodeURIComponent(url)) {
if (original_url === url) {
return true;
}

Expand Down Expand Up @@ -313,7 +313,7 @@ function Preview(elem, options) {
function (i, e) {
var n = $(e).attr('name');
if (n !== undefined) {
data[n] = decodeURIComponent($(e).val());
data[n] = $(e).val();
}
});
// Clears the Selector.
Expand Down

0 comments on commit 3be205d

Please sign in to comment.