Files
amethyst/commonsUI
Claude ff15246c7b fix: harden the title/favicon link preview fallback
Audit fixes for the compact link preview:

- Stop reading <title> and icon <link>s once <body> starts. </head> is
  optional, and without it an inline SVG's <title> ("Close", "Menu") was
  taken as the page title.
- Never cut a long <title> inside a surrogate pair.
- Match the HTML mime type case-insensitively: UrlPreview stores the
  server's spelling, so "Text/HTML" pages lost their icon.
- Honour data: icons. An inline data:image icon (up to 64 KB) is used as
  is; `href="data:,"` means "no favicon", so /favicon.ico is no longer
  requested for those sites.
- Remember icon URLs the server refused (HTTP errors only, not network
  errors) so a missing /favicon.ico is not re-requested every time its
  card scrolls back into view.
- Keep the open-in-browser callback stable across recompositions.
- Benchmark rows for the title/icon parse path: no measurable cost on
  the heavy head, ~1.5 us on a small one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KdPp7UiETpzv8jQ5qfAFqp
2026-10-01 14:37:31 +00:00
..