diff --git a/packages/@vuepress/core/lib/client/root-mixins/updateMeta.js b/packages/@vuepress/core/lib/client/root-mixins/updateMeta.js index c2265702f2..880fa655b0 100644 --- a/packages/@vuepress/core/lib/client/root-mixins/updateMeta.js +++ b/packages/@vuepress/core/lib/client/root-mixins/updateMeta.js @@ -1,4 +1,5 @@ import unionBy from 'lodash/unionBy' +import escape from 'escape-html' export default { // created will be called on both client and ssr @@ -132,7 +133,7 @@ function renderPageMeta (meta) { return meta.map(m => { let res = ` { - res += ` ${key}="${m[key]}"` + res += ` ${key}="${escape(m[key])}"` }) return res + `>` }).join('\n ')