mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Escape all user input
This commit is contained in:
		| @@ -94,19 +94,7 @@ | ||||
|             } | ||||
|  | ||||
|             buttons.forEach(function(button) { | ||||
|                 var text = ""; | ||||
|                 var titleAttribute=""; | ||||
|                 if (button.icon) { | ||||
|                     text = '<i class="'+button.icon+'"></i> '; | ||||
|                 } | ||||
|                 if (button.label) { | ||||
|                     text += button.label; | ||||
|                 } | ||||
|                 if (button.title) { | ||||
|                     titleAttribute = 'title="'+button.title+'"'; | ||||
|                 } | ||||
|                 $('<a href="#" class="red-ui-button red-ui-button-small red-ui-editableList-addButton" style="margin-top: 4px; margin-right: 5px;" '+titleAttribute+'></a>') | ||||
|                     .text(text) | ||||
|                 var element = $('<a href="#" class="red-ui-button red-ui-button-small red-ui-editableList-addButton" style="margin-top: 4px; margin-right: 5px;"></a>') | ||||
|                     .appendTo(that.topContainer) | ||||
|                     .on("click", function(evt) { | ||||
|                         evt.preventDefault(); | ||||
| @@ -114,6 +102,16 @@ | ||||
|                             button.click(evt); | ||||
|                         } | ||||
|                     }); | ||||
|                      | ||||
|                 if (button.title) { | ||||
|                     element.attr("title", button.title); | ||||
|                 } | ||||
|                 if (button.icon) { | ||||
|                     element.append($("<i></i>").attr("class", button.icon)); | ||||
|                 } | ||||
|                 if (button.label) { | ||||
|                     element.append($("<span></span>").text(" " + button.label)); | ||||
|                 } | ||||
|             }); | ||||
|   | ||||
|             if (this.element.css("position") === "absolute") { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user