mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-21 16:55:57 +00:00
fix(ui-templates): escape inline scripts correctly in ui templates
This commit is contained in:
parent
dfc66beeff
commit
c38ce0e0d9
@ -160,8 +160,8 @@ export const RenderPlugin = () => {
|
||||
`const props = defineProps(${props})`,
|
||||
title && 'useHead(' + genObjectFromRawEntries([
|
||||
['title', `\`${title}\``],
|
||||
['script', inlineScripts.map(s => ({ children: `\`${s}\`` }))],
|
||||
['style', [{ children: `\`${globalStyles}\`` }]],
|
||||
['script', inlineScripts.map(s => ({ children: `\`${s.replace(/[`$]/g, '\\$&')}\`` }))],
|
||||
['style', [{ children: `\`${globalStyles.replace(/[`$]/g, '\\$&')}\`` }]],
|
||||
]) + ')',
|
||||
'</script>',
|
||||
'<template>',
|
||||
|
Loading…
Reference in New Issue
Block a user