kopia lustrzana https://github.com/c9/core
fix html escaping in favorites
rodzic
4fefbac1fa
commit
7f11cd064e
|
@ -22,6 +22,8 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
var basename = require("path").basename;
|
var basename = require("path").basename;
|
||||||
var dirname = require("path").dirname;
|
var dirname = require("path").dirname;
|
||||||
|
var escapeHTML = require("ace/lib/lang").escapeHTML;
|
||||||
|
|
||||||
|
|
||||||
/***** Initialization *****/
|
/***** Initialization *****/
|
||||||
|
|
||||||
|
@ -650,9 +652,9 @@ define(function(require, exports, module) {
|
||||||
model.getCaptionHTML = function(node) {
|
model.getCaptionHTML = function(node) {
|
||||||
if (node.isFavorite) {
|
if (node.isFavorite) {
|
||||||
var path = node.labelPath || node.path;
|
var path = node.labelPath || node.path;
|
||||||
return basename(path)
|
return escapeHTML(basename(path))
|
||||||
+ "<span class='extrainfo'> - "
|
+ "<span class='extrainfo'> - "
|
||||||
+ dirname(path) + "</span>";
|
+ escapeHTML(dirname(path)) + "</span>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return getCaptionHTML.call(model, node);
|
return getCaptionHTML.call(model, node);
|
||||||
|
|
Ładowanie…
Reference in New Issue