Skip to content

Commit

Permalink
Better encoding via encodeURIComponent
Browse files Browse the repository at this point in the history
And fixed version #
  • Loading branch information
pipwerks committed Apr 12, 2016
1 parent cc3f6b5 commit b530128
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions pdfobject.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var PDFObject = (function (){
"use strict";
//jshint unused:true

var pdfobjectversion = "2.0.20160402",
var pdfobjectversion = "2.0.20160411.1",
supportsPDFs,

//declare functions
Expand Down Expand Up @@ -69,9 +69,7 @@ var PDFObject = (function (){

for (prop in pdfParams) {
if (pdfParams.hasOwnProperty(prop)) {
string += prop + "=";
string += (prop === "search") ? encodeURI(pdfParams[prop]) : pdfParams[prop];
string += "&";
string += encodeURIComponent(prop) + "=" + encodeURIComponent(pdfParams[prop]) + "&";
}
}

Expand Down
4 changes: 2 additions & 2 deletions pdfobject.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b530128

Please sign in to comment.