fix(os-message): decode banner as UTF-8 and restore list/paragraph styles - #16066
Merged
Merged
Conversation
…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>
blakeaowens
approved these changes
Sep 23, 2026
devGregA
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.mdascontent-type: text/markdownwith no charset. When atext/*response has no charset,requestsfalls back to ISO-8859-1, soresponse.textmangles any UTF-8 character. A published "Compare plans →" link rendered as "Compare plans â" plus two invisible control characters: the arrow's bytesE2 86 92, read one at a time.fetch_os_message()now setsresponse.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: noneand zeroes margins and padding onul,olandp, and nothing under.banner-expandedput 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.Responsewith a UTF-8 body and atext/markdownheader that has no charset. Onbugfixit fails with the garbledâ\x86\x92; with the fix it passes, along with the rest ofunittests.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