| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ss stream chunks Inject the trace meta tags at the first <head> and pass subsequent stream chunks through untouched, so a <head> appearing inside a quoted attribute value in a later chunk is no longer matched a second time. Fixes #23468 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
size-limit report 📦
|
Sorry, something went wrong.
|
still trying if I can get a reproduction for this, putting in draft for now |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
wrapFetchWithSentry rewrites the SSR HTML stream chunk-by-chunk to inject trace meta tags into <head>. Each chunk is scanned independently, so a <head> that appears inside a quoted attribute value in a later chunk gets injected into a second time.
Example — a document split so the real <head> and a second heat tag in an attribute land in different chunks:
chunk 1: <head></head><body><div data-content="junk chunk 2: <head>junk"></div></body> result: <head>[meta]</head>...<div data-content="junk<head>[meta]junk">... ^ injected into an attribute valueThis breaks because the per-chunk scan has no memory that injection already happened in an earlier chunk. This fix injects at the first <head> and then passes later chunks through untouched.
Note: This should fix a bug in the injection logic but not entirely sure this is the root cause of the attached issue (hard to reproduce since this depends on how the chunks get split up).
Fixes #23468