mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-04 20:29:01 +00:00
Merge pull request #5062 from G-Ambatte/fixChangeLog-#5059
Fix Change Log
This commit is contained in:
+7
-5
@@ -283,11 +283,13 @@ export default async function createApp(vite) {
|
|||||||
const safeProps = JSON.stringify(props).replace(/<(?=\/?script)/ig, '\\u003c');
|
const safeProps = JSON.stringify(props).replace(/<(?=\/?script)/ig, '\\u003c');
|
||||||
html = html.replace(
|
html = html.replace(
|
||||||
'<head>',
|
'<head>',
|
||||||
`<head>\n`
|
()=>{ //Replace must use a function instead of string, else brews with `$` in contents are treated as replacement patterns
|
||||||
+ `<script id="props">`
|
return `<head>\n`
|
||||||
+ `window.__INITIAL_PROPS__ = ` + safeProps
|
+ `<script id="props">`
|
||||||
+ `</script>\n`
|
+ `window.__INITIAL_PROPS__ = ${safeProps
|
||||||
+ ogMetaTags
|
}</script>\n${
|
||||||
|
ogMetaTags}`;
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
|
|||||||
Reference in New Issue
Block a user