diff --git a/IPython/html/static/notebook/js/widgets/widget_bool.js b/IPython/html/static/notebook/js/widgets/widget_bool.js index 960b143..050306d 100644 --- a/IPython/html/static/notebook/js/widgets/widget_bool.js +++ b/IPython/html/static/notebook/js/widgets/widget_bool.js @@ -59,7 +59,7 @@ define(["notebook/js/widgets/widget"], function(WidgetManager){ if (description.length === 0) { this.$label.hide(); } else { - this.$label.html(description); + this.$label.text(description); this.$label.show(); } } @@ -103,9 +103,9 @@ define(["notebook/js/widgets/widget"], function(WidgetManager){ var description = this.model.get('description'); if (description.length === 0) { - this.$el.html(' '); // Preserve button height + this.$el.text(' '); // Preserve button height } else { - this.$el.html(description); + this.$el.text(description); } } return ToggleButtonView.__super__.update.apply(this); diff --git a/IPython/html/static/notebook/js/widgets/widget_button.js b/IPython/html/static/notebook/js/widgets/widget_button.js index 6a5f460..50c448c 100644 --- a/IPython/html/static/notebook/js/widgets/widget_button.js +++ b/IPython/html/static/notebook/js/widgets/widget_button.js @@ -31,12 +31,10 @@ define(["notebook/js/widgets/widget"], function(WidgetManager){ // Called when the model is changed. The model may have been // changed by another view or by a state update from the back-end. var description = this.model.get('description'); - description = description.replace(/ /g, ' ', 'm'); - description = description.replace(/\n/g, '
\n', 'm'); if (description.length === 0) { - this.$el.html(' '); // Preserve button height + this.$el.text(' '); // Preserve button height } else { - this.$el.html(description); + this.$el.text(description); } if (this.model.get('disabled')) { diff --git a/IPython/html/static/notebook/js/widgets/widget_container.js b/IPython/html/static/notebook/js/widgets/widget_container.js index 9f8bde2..af8e1b2 100644 --- a/IPython/html/static/notebook/js/widgets/widget_container.js +++ b/IPython/html/static/notebook/js/widgets/widget_container.js @@ -71,7 +71,6 @@ define(["notebook/js/widgets/widget"], function(WidgetManager) { }, this); this.$el - .html('') .on("remove", function(){ that.$window.remove(); }); @@ -135,7 +134,7 @@ define(["notebook/js/widgets/widget"], function(WidgetManager) { }); this.$title = $('
') .addClass('widget-modal-title') - .html(' ') + .text(' ') .appendTo(this.$title_bar); this.$body = $('
') .addClass('modal-body') @@ -144,7 +143,7 @@ define(["notebook/js/widgets/widget"], function(WidgetManager) { .appendTo(this.$window); this.$show_button = $('