diff --git a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js index aa790153eee47fab1520b54cd07f4cf16e54b467..4953d18bfeb2ae6a560c7251217636f6684334de 100644 --- a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js +++ b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js @@ -198,9 +198,9 @@ AddProjectDialog.prototype.createGeneralTabContent = function () { return self.setFileParserForFilename(file.name); }); - var manualUrl = self.getConfiguration().getOption(ConfigurationType.USER_MANUAL_FILE); - table.appendChild(self.createRow([guiUtils.createLabel("Upload file: "), fileInput, - guiUtils.createHelpButton('File with the map. For a quick start, CellDesigner files are accepted directly. Available options and configurations of the source file are discussed in <a href="' + manualUrl + '">manual</a>.')])); + var manualUrl = self.getConfiguration().getOption(ConfigurationType.USER_MANUAL_FILE).getValue(); + var help = 'File with the map. For a quick start, CellDesigner files are accepted directly. Available options and configurations of the source file are discussed in <a href="' + manualUrl + '">manual</a>.'; + table.appendChild(self.createRow([guiUtils.createLabel("Upload file: "), fileInput, guiUtils.createHelpButton(help)])); var fileFormatSelect = Functions.createElement({ type: "select", diff --git a/frontend-js/src/main/js/gui/leftPanel/GuiUtils.js b/frontend-js/src/main/js/gui/leftPanel/GuiUtils.js index a1011046ecd1b85b7e25558d69f6bcfd8cad74b3..7dd3c7c4bdff56a0876449784e306fdee9fdb8c2 100644 --- a/frontend-js/src/main/js/gui/leftPanel/GuiUtils.js +++ b/frontend-js/src/main/js/gui/leftPanel/GuiUtils.js @@ -9,7 +9,7 @@ var AbstractGuiElement = require('../AbstractGuiElement'); var Functions = require('../../Functions'); var logger = require('../../logger'); -var xss= require('xss'); +var xss = require('xss'); var tabIdCounter = 0; @@ -670,7 +670,13 @@ GuiUtils.prototype.createTab = function (params) { } }; -GuiUtils.prototype.createHelpButton = function (toolTip) { +GuiUtils.prototype.createHelpButton = function (toolTip, useXss) { + var helpContent; + if (useXss) { + helpContent = xss(toolTip); + } else { + helpContent = toolTip; + } var helpTipButton = Functions.createElement({ type: "button", @@ -681,7 +687,8 @@ GuiUtils.prototype.createHelpButton = function (toolTip) { helpTipButton.onclick = function () { var helpDialogDiv = Functions.createElement({ type: "div", - content: xss(toolTip) + content: helpContent, + xss: false }); $(helpDialogDiv).dialog({ close: function () {