Skip to content

Commit

Permalink
docs: note about HTML default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum authored Jan 6, 2021
1 parent d45f84e commit 76361ca
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,24 @@ Of course, you can use a reactive property:
<button v-tooltip="tooltipContent">
```

**⚠️ 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:**

```js
import VTooltip from 'v-tooltip'
Vue.use(VTooltip, {
defaultHtml: false,
})
```

Or directly on package:

```js
import VTooltip from 'v-tooltip'
VTooltip.options.defaultHtml = false
```

*You can then specify `html: true` on each tooltip you want to render HTML in. See below for more info on the tooltip options.*

You can specify the tooltip position as a modifier:

```html
Expand Down

0 comments on commit 76361ca

Please sign in to comment.