Skip to content

Commit 76361ca

Browse files
authored
docs: note about HTML default value
1 parent d45f84e commit 76361ca

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,24 @@ Of course, you can use a reactive property:
162162
<button v-tooltip="tooltipContent">
163163
```
164164

165+
**⚠️ HTML is enabled in the tooltip by default. If you plan on using content coming from the users, please disable HTML parsing with the `html` global option to prevent XSS attacks:**
166+
167+
```js
168+
import VTooltip from 'v-tooltip'
169+
Vue.use(VTooltip, {
170+
defaultHtml: false,
171+
})
172+
```
173+
174+
Or directly on package:
175+
176+
```js
177+
import VTooltip from 'v-tooltip'
178+
VTooltip.options.defaultHtml = false
179+
```
180+
181+
*You can then specify `html: true` on each tooltip you want to render HTML in. See below for more info on the tooltip options.*
182+
165183
You can specify the tooltip position as a modifier:
166184

167185
```html

0 commit comments

Comments
 (0)