Usage
TheuseHeadSafe composable is a wrapper around the useHead composable that restricts the input to only allow safe values. This is the recommended way to manage head data when working with user input, as it prevents XSS attacks by sanitizing potentially dangerous attributes.
Parameters
MaybeComputedRef<HeadSafe>
required
A
MaybeComputedRef<HeadSafe> object containing head data. You can pass all the same values as useHead, but only safe attributes will be rendered.Return Values
This composable does not return any value.Allowed Attributes
The following attributes are whitelisted for each head element type:Example
[app/pages/user-profile.vue]