-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Expense - Share code title shows HTML tags when expense description has mark down #61305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Triggered auto assignment to @joekaufmanexpensify ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Expense - Share code title shows HTML tags when expense description has mark down What is the root cause of that problem?getReportName returns html format report name here. And we display the title without converting it to text. App/src/pages/ShareCodePage.tsx Line 97 in 223a34c
What changes do you think we should make in order to solve the problem?We should use Parser.htmlToText to convert the title from getReportName to text. We can optionally use htmlToMarkdown if we want to render the title as markdown
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A - ui issue What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Share code title shows HTML tags when expense description has mark down What is the root cause of that problem?In share code page, we get title using App/src/pages/ShareCodePage.tsx Line 97 in 223a34c
What changes do you think we should make in order to solve the problem?We should parse report name using App/src/pages/ShareCodePage.tsx Line 97 in 223a34c
const title = isReport ? StringUtils.lineBreaksToSpaces(Parser.htmlToText(getReportName(report))) : currentUserPersonalDetails.displayName ?? ''; What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None What alternative solutions did you explore? (Optional)We can add Lines 4814 to 4816 in 223a34c
Lines 4713 to 4715 in 223a34c
Line 4662 in 223a34c
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
Ehhh, this is a pretty significant edge case/polish. It requires putting markdown in the description (which I highly doubt will be common, except maybe with a URL, and even then) AND going to the share code. Even then, there's not really any impact as the QR code and URL are fine. I'm going to close this for now. Let's revisit this if there is any actual customer feedback about this. |
@joekaufmanexpensify There's a recently merged PR that fixes the similar bug in several other components, so I think we should fix here as well to maintain app consistency. |
I get that, but the share code feels much more hidden than those. My 2c is this is probably fine to leave as-is for now. i think it'd be better to holistically address all cases of this in the app rather than keep handling these as one-off issues. And given this one is niche, I think it's fine to do nothing for now. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.1.39-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Money Requests
Action Performed:
Expected Result:
Share code title will not show HTML tags when expense description has mark down.
Actual Result:
Share code title shows HTML tags when expense description has mark down
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6819283_1746168732363.20250502_144937.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: