Skip to content

fix: Restore Rich markup escaping lost in refactoring#151

Merged
holmboe merged 1 commit intomasterfrom
fix/rich-tags-exceptions
Mar 7, 2026
Merged

fix: Restore Rich markup escaping lost in refactoring#151
holmboe merged 1 commit intomasterfrom
fix/rich-tags-exceptions

Conversation

@holmboe
Copy link
Contributor

@holmboe holmboe commented Mar 7, 2026

Summary

  • Restores rich.markup.escape() functionality that was lost when display logic was moved from phabfive/maniphest.py to phabfive/cli.py during refactoring (commits 4f19573, 0fb3d1b)
  • Adds _escape_for_rich() helper function to safely escape user content
  • Escapes user content in both display_task_rich() and display_task_tree() functions

Problem

The refactor commits moved display logic to cli.py but failed to carry over the escape fix from PR #137. This caused:

Test plan

  • All 309 tests pass
  • Linter passes
  • Manual test: phabfive maniphest show T525 displays without crash
  • Manual test: Tasks with [bug] prefix show the tag correctly

🤖 Generated with Claude Code

The refactor commits (4f19573, 0fb3d1b) moved display logic from
phabfive/maniphest.py to phabfive/cli.py but failed to carry over
the rich.markup.escape() fix from PR #137.

This restores the escaping by:
- Adding _escape_for_rich() helper function
- Escaping user content in display_task_rich() and display_task_tree()

Fixes regression of #135 (MarkupError on [/path] patterns) and
#136 (silent stripping of [bug] tags).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@holmboe holmboe force-pushed the fix/rich-tags-exceptions branch from be3fd54 to 9b37d11 Compare March 7, 2026 15:47
@holmboe holmboe merged commit 86c27c0 into master Mar 7, 2026
17 checks passed
@holmboe holmboe deleted the fix/rich-tags-exceptions branch March 7, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant