Escape dynamic tooltip text before embedding in BBCode #61
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens#61
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
## Goal
Prevent CardUtilityStats tooltip BBCode from being broken by dynamic game/mod display text that contains square brackets.
Why this is real product behavior
The tooltip body is rendered through Godot
RichTextLabelBBCode. Several rows combine trusted markup that CardUtilityStats owns, such as icons/tables/colors/bold tags, with dynamic display text from cards, powers/effects, and blocked-draw reason labels.If a dynamic name contains text like
[b],[color=red], or a stray[, the stats tooltip can accidentally format that text or corrupt the BBCode structure instead of showing the literal game/mod name.Likely area
Start in:
Core/Patches/CardHoverTooltipPatch.csTests/CardUtilityStats.Core.Tests/Likely dynamic strings to review include:
Do not escape CardUtilityStats-owned BBCode markup such as
[table],[img],[b],[color], etc. Escape only dynamic text before it is inserted into BBCode.Acceptance criteria
Weird [b]Power[/b]render literally instead of becoming active BBCode.Closing this generated test issue so we can use the existing Make It So queue candidate instead (#56).