Skip to content

Commit

Permalink
Use String.quote uniformly
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvaray committed Nov 29, 2013
1 parent 78c8965 commit f9cd75c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions extension/chrome/content/spa_eye/hooks/bb/bbhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,11 @@ define([

inferScriptForView:function (script_id) {
var rendered = this._current.View;
var id = String.quote(script_id);
if (rendered) {// Is this being rendered in context of a view?
var templates = rendered.__templates__;
if (templates.indexOf(script_id) == -1) {
templates.push(script_id);
if (templates.indexOf(id) == -1) {
templates.push(id);
}
}
},
Expand All @@ -193,7 +194,7 @@ define([
var f = encodeURIComponent("window[" + String.quote("_t"+ script_id) + "]=" + source);
DOM.appendExternalScriptTagToHead(root.document,
"data:text/javascript;fileName=" + String.quote(script_id) + ";," + f);
this._templates[script_id] = text;
this._templates[String.quote(script_id)] = text;
} catch (e) {
self.logError(e);
}
Expand Down

0 comments on commit f9cd75c

Please sign in to comment.