mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-20 10:40:34 +03:00
feat: add es build
fix: add global window detection chore: update deps
This commit is contained in:
@@ -3,6 +3,14 @@ import { isFunction } from '../shared/typeof'
|
||||
import updateClientMetaInfo from './updateClientMetaInfo'
|
||||
|
||||
export default function _refresh(options = {}) {
|
||||
const escapeSequences = [
|
||||
[/&/g, '\u0026'],
|
||||
[/</g, '\u003c'],
|
||||
[/>/g, '\u003e'],
|
||||
[/"/g, '\u0022'],
|
||||
[/'/g, '\u0027']
|
||||
]
|
||||
|
||||
/**
|
||||
* When called, will update the current meta info with new meta info.
|
||||
* Useful when updating meta info as the result of an asynchronous
|
||||
@@ -14,7 +22,7 @@ export default function _refresh(options = {}) {
|
||||
* @return {Object} - new meta info
|
||||
*/
|
||||
return function refresh() {
|
||||
const metaInfo = getMetaInfo(options, this.$root)
|
||||
const metaInfo = getMetaInfo(options, this.$root, escapeSequences)
|
||||
|
||||
const tags = updateClientMetaInfo(options, metaInfo)
|
||||
// emit "event" with new info
|
||||
|
||||
Reference in New Issue
Block a user