mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 13:48:13 +00:00
fix(templates): don't use v-html
on <NuxtLink>
This commit is contained in:
parent
e2a6da9b04
commit
f24d9689c0
@ -78,7 +78,7 @@ export const RenderPlugin = () => {
|
||||
.replace(/(?<=<|<\/)body/g, 'div')
|
||||
.replace(/messages\./g, '')
|
||||
.replace(/<script[^>]*>([\s\S]*?)<\/script>/g, '')
|
||||
.replace(/<a href="(\/[^"]*)"([^>]*)>([\s\S]*)<\/a>/g, '<NuxtLink to="$1"$2>$3</NuxtLink>')
|
||||
.replace(/<a href="(\/[^"]*)"([^>]*)>([\s\S]*)<\/a>/g, '<NuxtLink to="$1"$2>\n$3\n</NuxtLink>')
|
||||
.replace(/>{{\s*(\w+?)\s*}}<\/[\w-]*>/g, ' v-html="$1" />')
|
||||
// We are not matching <link> <script> and <meta> tags as these aren't used yet in nuxt/ui
|
||||
// and should be taken care of wherever this SFC is used
|
||||
|
Loading…
Reference in New Issue
Block a user