[go: nahoru, domu]

Skip to content

Commit

Permalink
Always use correct xml header
Browse files Browse the repository at this point in the history
  • Loading branch information
JustOff committed May 25, 2018
1 parent 01d2d1c commit 86cd05e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ Cu.import("resource://gre/modules/AddonManager.jsm");

const branch = "extensions.ublock0-updater.";
const XMLHttpRequest = CC("@mozilla.org/xmlextras/xmlhttprequest;1","nsIXMLHttpRequest");
const u0id = "uBlock0@raymondhill.net", u0Data = `<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
const u0id = "uBlock0@raymondhill.net", u0Data = `<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:uBlock0@raymondhill.net">
<em:updates>
<RDF:Seq>
Expand Down Expand Up @@ -105,11 +104,11 @@ TracingListener.prototype = {
}
},
onStopRequest: function(request, context, statusCode) {
var data;
var data = '<?xml version="1.0" encoding="UTF-8"?>';
if (u0Ver != "") {
data = u0Data.replace(/%VERSION%/g, u0Ver);
data += u0Data.replace(/%VERSION%/g, u0Ver);
} else {
data = '<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"></RDF:RDF>';
data += '<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"></RDF:RDF>';
}
var storageStream = CCIN("@mozilla.org/storagestream;1", "nsIStorageStream");
storageStream.init(8192, data.length, null);
Expand Down

0 comments on commit 86cd05e

Please sign in to comment.