Title: [Low][ssr] head titleTemplate uses String.replace — $&/$1 in title mangle output · Issue #177 · bQuery/bQuery · GitHub
Open Graph Title: [Low][ssr] head titleTemplate uses String.replace — $&/$1 in title mangle output · Issue #177 · bQuery/bQuery
X Title: [Low][ssr] head titleTemplate uses String.replace — $&/$1 in title mangle output · Issue #177 · bQuery/bQuery
Description: Severity: 🟢 Low (correctness — not exploitable) Location src/ssr/head.ts:114-117. Description titleTemplate is applied with: state.titleTemplate.replace(/%s/g, state.title) Because state.title is used as the replacement string, special r...
Open Graph Description: Severity: 🟢 Low (correctness — not exploitable) Location src/ssr/head.ts:114-117. Description titleTemplate is applied with: state.titleTemplate.replace(/%s/g, state.title) Because state.title is u...
X Description: Severity: 🟢 Low (correctness — not exploitable) Location src/ssr/head.ts:114-117. Description titleTemplate is applied with: state.titleTemplate.replace(/%s/g, state.title) Because state.title is u...
Opengraph URL: https://github.com/bQuery/bQuery/issues/177
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Low][ssr] head titleTemplate uses String.replace — $\u0026/$1 in title mangle output","articleBody":"## Severity: 🟢 Low (correctness — not exploitable)\n\n## Location\n[`src/ssr/head.ts:114-117`](../blob/main/src/ssr/head.ts#L114-L117).\n\n## Description\n`titleTemplate` is applied with:\n```ts\nstate.titleTemplate.replace(/%s/g, state.title)\n```\nBecause `state.title` is used as the **replacement string**, special replacement patterns (`$\u0026`, `$1`, `$'`, `` $` ``) in the title are interpreted by `String.prototype.replace` and mangle the output. Not a security issue (the result is `escapeText`'d before emission), but a correctness bug — e.g. a page titled `Q\u0026A $\u0026 more` renders incorrectly.\n\n## Suggested fix\nUse a replacer function so the title is inserted literally:\n```ts\nstate.titleTemplate.replace(/%s/g, () =\u003e state.title)\n```\n\n---\n_Filed as part of a full-codebase security \u0026 correctness audit._\n","author":{"url":"https://github.com/JosunLP","@type":"Person","name":"JosunLP"},"datePublished":"2026-07-05T17:03:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/177/bQuery/issues/177"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:85e03ce5-395b-c1b9-4d78-cdeaee748b9a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B428:10ED6:4C1234:665EF0:6A4DCBBC |
| html-safe-nonce | d68c6a62d9c158ff757884d399b9e9154756a5640727eb0f6706e179a44885ed |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDI4OjEwRUQ2OjRDMTIzNDo2NjVFRjA6NkE0RENCQkMiLCJ2aXNpdG9yX2lkIjoiNjAxNzc3ODQ4MjM2NDE0MDQ3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 69931e510c137c53caeb619859024532a01c8f4331f14b309001982086bbb2f9 |
| hovercard-subject-tag | issue:4813696221 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bQuery/bQuery/177/issue_layout |
| twitter:image | https://opengraph.githubassets.com/170b0e081b7196410dcddc463d64afaaf29709476f2bbf2f21b6bdf667cc0e6d/bQuery/bQuery/issues/177 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/170b0e081b7196410dcddc463d64afaaf29709476f2bbf2f21b6bdf667cc0e6d/bQuery/bQuery/issues/177 |
| og:image:alt | Severity: 🟢 Low (correctness — not exploitable) Location src/ssr/head.ts:114-117. Description titleTemplate is applied with: state.titleTemplate.replace(/%s/g, state.title) Because state.title is u... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JosunLP |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/bQuery/bQuery git https://github.com/bQuery/bQuery.git |
| octolytics-dimension-user_id | 256381806 |
| octolytics-dimension-user_login | bQuery |
| octolytics-dimension-repository_id | 1139284244 |
| octolytics-dimension-repository_nwo | bQuery/bQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1139284244 |
| octolytics-dimension-repository_network_root_nwo | bQuery/bQuery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width