[$175] iOS Safari - Chat - Bold and italic formatting is lost when pasting rich text
Maintainers usually reply within 1 day
@truph01 is already working on this.
Since Nov 4, 2026.
Assessment
This issue has not been assessed yet.
Description
Reproducible in staging?: Yes
Issue reported by: @Uzaifm127
Source: Follow-up from https://github.com/Expensify/App/issues/85907#issuecomment-6451147442 on Chat - Emojis pasted from Slack render as images
The Safari clipboard contains formatting information, but bold and italic text become plain text after pasting. This is separate from recognizing emoji images.
Action Performed:
- In Slack , enter a message containing an emoji and these three phrases:
Bold,,Italic Bold,, andItalic. - Use Slack's formatting controls to make
Bold,bold,Italic Bold,both bold and italic, andItalicitalic. Send the message and confirm that Slack displays those styles. - Select and copy the whole rendered message.
- On iOS safari, open a chat.
- Clear the composer and paste the copied message.
Expected Result:
The pasted phrases retain the same bold and italic formatting shown in Slack.
Actual Result:
The words are pasted, but their bold and italic formatting is lost. The bold, bold-and-italic, and italic phrases appear as plain text.
Workaround:
Reapply the bold and italic formatting manually after pasting.
Platforms:
Platforms where the issue reproduced (other platforms not tested):
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
https://github.com/user-attachments/assets/9348903e-7fe4-48a5-b74e-8c095ddeb5bd
Root cause
- Safari puts the bold and italic formatting on
<span>elements. For example,Bold,has a bold style, andItalic Bold,has both bold and italic styles. The formatting is in the copied HTML, but not in<b>,<strong>,<i>, or<em>tags. handlePastedHTML()sends the HTML toParser.htmlToMarkdown(): https://github.com/Expensify/App/blob/5bd95161056013f594b1c6f01e84f046433e7f6e/src/hooks/useHtmlPaste/index.ts#L186. The parser's bold and italic rules look for those tags, so they do not recognize the formatting on Safari's<span>elements.- The parser removes the remaining HTML tags, leaving only the words. That is why
Bold,,Italic Bold,andItalicappear in the Composer without their copied formatting.
Issue Owner
Current Issue Owner: @truph01Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022118114383622871121
- Upwork Job ID: 2118114383622871121
- Last Price Increase: 2026-11-04
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 561
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Expensify/App
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.OpenMonthly Not a priority
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Expensify/App#106080 · 1 comment ·
Maintainers usually reply within 1 day
-
Monthly Not a priority
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Expensify/App#106057 · 1 comment ·
Maintainers usually reply within 1 day
-
Reviewing Weekly
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Expensify/App#105383 · 1 comment ·
Maintainers usually reply within 1 day
-
Monthly Not a priority
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Expensify/App#105341 · 2 comments ·
Maintainers usually reply within 1 day
-
Monthly Not a priority
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Expensify/App#105100 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vercel-labs/durable-harness#53 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area/docs area/ui enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
melgarafael/DeskcommCRM#4098 ·
Maintainers usually reply within 1 day
-
bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kerti/balances-v2#801 ·
Maintainers usually reply within 1 day
-
lesson-submission pending-review
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Ikalus1988/MisakaNet#4510 ·
Maintainers usually reply within 1 day