Skip to content

Commit

Permalink
fix(tooltip): XSS on data-viewport attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
don-spyker authored and Dominik Speicher committed Aug 10, 2018
1 parent 7cfc6a9 commit 5c71ecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
this.inState = { click: false, hover: false, focus: false }

if (this.$element[0] instanceof document.constructor && !this.options.selector) {
Expand Down

0 comments on commit 5c71ecf

Please # to comment.