mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
Backport sanitize docs from v4.
This commit is contained in:
@@ -115,6 +115,11 @@ $('#example').tooltip(options)
|
||||
|
||||
<h3 id="tooltips-options">Options</h3>
|
||||
<p>Options can be passed via data attributes or JavaScript. For data attributes, append the option name to <code>data-</code>, as in <code>data-animation=""</code>.</p>
|
||||
|
||||
<div class="bs-callout bs-callout-warning" id="callout-tooltip-disabled-options">
|
||||
<p>Note that for security reasons the <code>sanitize</code>, <code>sanitizeFn</code> and <code>whiteList</code> options cannot be supplied using data attributes.</p>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-striped js-options-table">
|
||||
<thead>
|
||||
@@ -206,6 +211,24 @@ $('#example').tooltip(options)
|
||||
<p>If a function is given, it is called with the triggering element DOM node as its only argument. The <code>this</code> context is set to the tooltip instance.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sanitize</td>
|
||||
<td>boolean</td>
|
||||
<td>true</td>
|
||||
<td>Enable or disable the sanitization. If activated <code>'template'</code>, <code>'content'</code> and <code>'title'</code> options will be sanitized.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>whiteList</td>
|
||||
<td>object</td>
|
||||
<td><a href="#js-sanitizer">Default value</a></td>
|
||||
<td>Object which contains allowed attributes and tags</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>sanitizeFn</td>
|
||||
<td>null | function</td>
|
||||
<td>null</td>
|
||||
<td>Here you can supply your own sanitize function. This can be useful if you prefer to use a dedicated library to perform sanitization.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.table-responsive -->
|
||||
|
||||
Reference in New Issue
Block a user