Skip to content

fix(os-message): decode banner as UTF-8 and restore list/paragraph styles - #16066

Merged
Maffooch merged 1 commit into
bugfixfrom
fix/os-message-utf8-and-list-styles
Sep 23, 2026
Merged

Maffooch merged 1 commit into
bugfixfrom
fix/os-message-utf8-and-list-styles

Conversation

@Maffooch

@Maffooch Maffooch commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Shortcut: sc-15682

Summary

Two fixes for the open-source message banner. Both turned up while checking a new message locally before rollout.

Non-ASCII characters were garbled. The message bucket serves open_source_message.md as content-type: text/markdown with no charset. When a text/* response has no charset, requests falls back to ISO-8859-1, so response.text mangles any UTF-8 character. A published "Compare plans →" link rendered as "Compare plans â" plus two invisible control characters: the arrow's bytes E2 86 92, read one at a time. fetch_os_message() now sets response.encoding = "utf-8" before reading the body. The publisher always writes UTF-8.

Markdown lists and paragraphs rendered flush. The base CSS reset sets list-style: none and zeroes margins and padding on ul, ol and p, and nothing under .banner-expanded put them back. Bullets had no markers and paragraphs ran together, so the OSS banner didn't match the publisher preview. The new styles are scoped to .banner-expanded: disc and decimal markers, a 1.5em indent, and a 0.5em bottom margin.

The regression test builds a real requests.Response with a UTF-8 body and a text/markdown header that has no charset. On bugfix it fails with the garbled â\x86\x92; with the fix it passes, along with the rest of unittests.test_os_message (38 tests).

Instances that already cached a garbled message get the corrected text once the one-hour cache expires.

🤖 Generated with Claude Code

…yles

The OS message bucket serves text/markdown with no charset, so requests
decoded it as ISO-8859-1 and non-ASCII characters were garbled on every
instance ("→" rendered as "â" plus two invisible control characters).
Force UTF-8, which is what the publisher writes.

The base CSS reset also zeroed list markers and block margins inside the
expanded banner, so markdown bullets had no markers and paragraphs ran
together. Restore them, scoped to .banner-expanded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Maffooch Maffooch added this to the 3.3.300 milestone Sep 23, 2026
@Maffooch
Maffooch enabled auto-merge September 23, 2026 16:41
@Maffooch
Maffooch added this pull request to the merge queue Sep 23, 2026
Merged via the queue into bugfix with commit 76b86db Sep 23, 2026
48 checks passed
@Maffooch
Maffooch deleted the fix/os-message-utf8-and-list-styles branch September 23, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants