Skip to content

Commit 3f360c8

Browse files
committed
Fix lint issues
1 parent 7719dd5 commit 3f360c8

File tree

1 file changed

+1
-4
lines changed
  • packages/app/src/cli/services/dev/graphiql

1 file changed

+1
-4
lines changed

packages/app/src/cli/services/dev/graphiql/server.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,7 @@ export function setupGraphiQLServer({
189189
// Inject config script before </head>
190190
// Escape < > & in JSON to prevent XSS when embedding in HTML script tags
191191
// Use Unicode escapes so JavaScript correctly decodes them (HTML entities would break the query)
192-
const safeJson = JSON.stringify(config)
193-
.replace(/</g, '\\u003c')
194-
.replace(/>/g, '\\u003e')
195-
.replace(/&/g, '\\u0026')
192+
const safeJson = JSON.stringify(config).replace(/</g, '\\u003c').replace(/>/g, '\\u003e').replace(/&/g, '\\u0026')
196193
const configScript = `<script>window.__GRAPHIQL_CONFIG__ = ${safeJson};</script>`
197194
indexHtml = indexHtml.replace('</head>', `${configScript}\n </head>`)
198195

0 commit comments

Comments
 (0)