Skip to content

[Due for payment 2026-05-28] [$250] Bullet lists render extra bullet from orphaned <br/> and have suboptimal spacing #89039

Description

@MelvinBot

Bug: HTML bullet lists render an extra bullet and have suboptimal spacing

Slack thread: https://expensify.slack.com/archives/C090U774ZH7/p1777346806172969

Problem

When Concierge sends HTML containing <ul>/<li> bullet lists, two issues appear:

  1. Extra bullet: An empty extra bullet renders at the end of the list
  2. Spacing: The overall styling/spacing of bullet lists feels off

Root Cause (Extra Bullet)

Concierge sends HTML like:

<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li><br/></ul>

Note the <br/> tag inside the <ul> but outside any <li>. The rendering pipeline converts <ul>/<li> to custom <bullet-list>/<bullet-item> tags via ExpensiMark, but the orphaned <br/> remains inside the <bullet-list> container. The react-native-render-html library then renders this as an additional empty bullet.

Relevant Code

  • ExpensiMark (in expensify-common): Transforms <ul>/<li><bullet-list>/<bullet-item> — may need to strip orphaned <br/> tags inside <ul> during transformation
  • src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx: Defines custom element models for bullet-list and bullet-item, and has existing whitespace filtering logic (domVisitors.onText) that prevents empty bullets from whitespace — but doesn't handle <br/> tags
  • src/components/HTMLEngineProvider/HTMLRenderers/BulletItemRenderer.tsx: Renders individual bullet items with CONST.DOT_SEPARATOR (•)

Expected Behavior

  • The <br/> inside <ul> should not create an extra bullet
  • Bullet list spacing should follow design recommendations

Suggested Fix

Either:

  1. Strip <br/> tags that are direct children of <ul> during the ExpensiMark HTML-to-custom-tag transformation
  2. Add a domVisitors.onElement handler in BaseHTMLEngineProvider.tsx to remove <br> nodes that are direct children of <bullet-list>

The spacing issue should be addressed with design input on the correct marginVertical, paddingLeft, and line-height values for bullet-list and bullet-item.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022048969288184722028
  • Upwork Job ID: 2048969288184722028
  • Last Price Increase: 2026-04-28
  • Automatic offers:
    • aimane-chnaif | Reviewer | 111254189
Issue OwnerCurrent Issue Owner: @mallenexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions