-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #478 from hlhc/fix/ssg-hash-inline-regex
fix(csp): inline script/style have whitespace character
- Loading branch information
Showing
5 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
test/fixtures/ssgHashes/pages/inline-script-with-linebreak.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<template> | ||
<div>Default page</div> | ||
</template> | ||
<script setup> | ||
useHead({ | ||
script: [ | ||
{ | ||
textContent: ` | ||
window.myImportantVar = 1 | ||
`, | ||
type: 'text/javascript' | ||
} | ||
] | ||
}) | ||
</script> |
15 changes: 15 additions & 0 deletions
15
test/fixtures/ssgHashes/pages/inline-style-with-linebreak.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<div>Default page</div> | ||
</template> | ||
<script setup> | ||
useHead({ | ||
style: [ | ||
{ | ||
textContent: ` | ||
div { color: blue } | ||
`, | ||
type: 'text/css' | ||
} | ||
] | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters