Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-sass.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'assets/javascripts/bootstrap/popover.js')
-rw-r--r--assets/javascripts/bootstrap/popover.js29
1 files changed, 22 insertions, 7 deletions
diff --git a/assets/javascripts/bootstrap/popover.js b/assets/javascripts/bootstrap/popover.js
index f72c32af..66a301cb 100644
--- a/assets/javascripts/bootstrap/popover.js
+++ b/assets/javascripts/bootstrap/popover.js
@@ -1,8 +1,8 @@
/* ========================================================================
- * Bootstrap: popover.js v3.4.0
+ * Bootstrap: popover.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#popovers
* ========================================================================
- * Copyright 2011-2018 Twitter, Inc.
+ * Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@@ -19,7 +19,7 @@
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
- Popover.VERSION = '3.4.0'
+ Popover.VERSION = '3.4.1'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
@@ -45,10 +45,25 @@
var title = this.getTitle()
var content = this.getContent()
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
- this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
- ](content)
+ if (this.options.html) {
+ var typeContent = typeof content
+
+ if (this.options.sanitize) {
+ title = this.sanitizeHtml(title)
+
+ if (typeContent === 'string') {
+ content = this.sanitizeHtml(content)
+ }
+ }
+
+ $tip.find('.popover-title').html(title)
+ $tip.find('.popover-content').children().detach().end()[
+ typeContent === 'string' ? 'html' : 'append'
+ ](content)
+ } else {
+ $tip.find('.popover-title').text(title)
+ $tip.find('.popover-content').children().detach().end().text(content)
+ }
$tip.removeClass('fade top bottom left right in')