Commit a412c13
fix(blog): strip query string and hash from SEO canonical and JSON-LD URLs (#1645)
Requests arriving with ?utm_source=..., ?page=2 or a #hash were leaking
those into the canonical link, the BlogPosting/Blog url and
mainEntityOfPage, and the BreadcrumbList items emitted by SeoBlogPost
and SeoBlogPostListing. Normalize in withCanonicalBase so every emitted
URL is origin + pathname only, both with and without a configured
canonicalBaseUrl. Relative URLs without a base still pass through
unchanged.
Co-authored-by: decobot <capy@deco.cx>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent aae0ee6 commit a412c13
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | | - | |
36 | | - | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
0 commit comments