You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/forms/range-slider.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,10 +194,14 @@ const rangeSlider = new RangeSlider(rangeSliderElement, {
194
194
{{< partial "js-data-attributes.md" >}}
195
195
{{< /markdown >}}
196
196
197
+
{{< callout warning >}}
198
+
Please note that for security reasons, the `sanitize`, `sanitizeFn`, and `allowList` options cannot be supplied via data attributes.
199
+
{{< /callout >}}
197
200
198
201
{{< bs-table >}}
199
202
| Name | Type | Default | Description |
200
203
| --- | --- | --- | --- |
204
+
|`allowList`| object |[Default value](/getting-started/javascript#sanitizer)| Defines the set of permitted HTML tags and attributes that can safely appear in the tooltip content when HTML content is passedd. This helps maintain control over the output and prevent injection of malicious code. |
201
205
|`clickableLabels`| boolean |`true`| Enables or disables the ability to click on labels to set slider values. |
202
206
|`disabled`| boolean |`false`| Disables the slider, making it non-interactive and grayed out. |
203
207
|`distance`| number |`0`| Sets the minimum distance between multiple slider handles. |
@@ -211,6 +215,8 @@ const rangeSlider = new RangeSlider(rangeSliderElement, {
211
215
|`track`| boolean, 'fill' |`'fill'`| Controls the visual representation of the slider's track. When set to `'fill'`, the track is dynamically filled based on the slider's value(s). Setting it to `false` disables the filled track. |
212
216
|`value`| array, number |`0`| Sets the initial value(s) of the slider. |
213
217
|`vertical`| boolean |`false`| Rotates the slider to a vertical orientation. |
218
+
|`sanitize`| boolean |`true`| Controls whether HTML content in the tooltip should be sanitized before rendering. Strongly recommended to leave enabled unless you’re fully managing the content and trust its source. |
219
+
|`sanitizeFn`| null, function |`null`| You can define your own custom sanitization logic by passing a function here. Ideal if you want to use a specialized HTML sanitizer or integrate with existing security tool. |
0 commit comments