kopia lustrzana https://github.com/c9/core
Merge pull request +15624 from c9/escape-html-issues
fix html escape issuespull/453/head
commit
672a730a7d
|
@ -1,18 +1,19 @@
|
|||
define(function(require, exports, module) {
|
||||
main.consumes = [
|
||||
"immediate", "settings", "debugger", "Evaluator", "callstack", "ui"
|
||||
"immediate", "debugger", "Evaluator", "callstack", "ui"
|
||||
];
|
||||
main.provides = ["immediate.debugnode"];
|
||||
return main;
|
||||
|
||||
function main(options, imports, register) {
|
||||
var Evaluator = imports.Evaluator;
|
||||
var settings = imports.settings;
|
||||
var debug = imports.debugger;
|
||||
var immediate = imports.immediate;
|
||||
var callstack = imports.callstack;
|
||||
var ui = imports.ui;
|
||||
|
||||
var escapeHTML = require("ace/lib/lang").escapeHTML;
|
||||
|
||||
/***** Initialization *****/
|
||||
|
||||
var plugin = new Evaluator("Ajax.org", main.consumes, {
|
||||
|
@ -450,7 +451,7 @@ define(function(require, exports, module) {
|
|||
else {
|
||||
// A value of unknown type which does not have any properties - assume it is a language-specific
|
||||
// primitive type.
|
||||
insert(html, value, name);
|
||||
insert(html, escapeHTML(value), name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ define(function(require, exports, module) {
|
|||
var css = require("text!./upload_progress.css");
|
||||
var TreeData = require("ace_tree/data_provider");
|
||||
var Tree = require("ace_tree/tree");
|
||||
var escapeHTML = require("ace/lib/lang").escapeHTML;
|
||||
|
||||
var boxUploadActivityMarkup = require("text!./markup/box_upload_activity.xml");
|
||||
|
||||
|
@ -79,10 +80,10 @@ define(function(require, exports, module) {
|
|||
mdlUploadActivity.rowHeightInner = 20;
|
||||
mdlUploadActivity.getContentHTML = function(node) {
|
||||
return "<span class='uploadactivity-caption'>"
|
||||
+ node.label
|
||||
+ escapeHTML(node.label)
|
||||
+ "</span>"
|
||||
+ "<span class='uploadactivity-progress'>"
|
||||
+ (node.progress == undefined ? " " : node.progress + "%") + "</span>"
|
||||
+ (node.progress == undefined ? " " : escapeHTML(node.progress + "%")) + "</span>"
|
||||
+ "<span class='uploadactivity-delete'> </span>";
|
||||
};
|
||||
mdlUploadActivity.updateProgress = function(node, val) {
|
||||
|
|
Ładowanie…
Reference in New Issue