Skip to content
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

[$1000] Web- Admin - Nothing appears if workspace is named <workspace_name starting with < #20080

Closed
1 of 6 tasks
kbecciv opened this issue Jun 2, 2023 · 63 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jun 2, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Go to staging expensify on web chrome
  2. Create a new workspace > Go to admins channel
  3. Change the name of the workspace to < followed by some word
  4. Result: See that in the admins room , nothing is displayed after 'to' at the end

Expected Result:

The updated workspace name should appear properly even when it is named as < followed by any word

Actual Result:

Nothing appears if workspace is named <workspace_name starting with <. Also the whole line is shown in a different color.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.22.0

Reproducible in staging?: yes

Reproducible in production?: yes

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

nameerror.mp4
Recording.2946.mp4

Expensify/Expensify Issue URL:

Issue reported by: @avi-shak-jha

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684769611423049

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014aa9edd793117534
  • Upwork Job ID: 1666602306347040768
  • Last Price Increase: 2023-12-20
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

Triggered auto assignment to @arielgreen (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 2, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Jun 3, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Web- Admin - Nothing appears if workspace is named <workspace_name starting with <

What is the root cause of that problem?

The root cause for this problem is that, the HTML coming from backend is not encoded.

image

The html should have &lt; instead of <

Explanation

When we are using html entities (<, > etc) they need to be encoded.
The message is rendered by this component - ReportActionItemFregment here

// Only render HTML if we have html in the fragment
if (!differByLineBreaksOnly) {
const isPendingDelete = props.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && props.network.isOffline;
const editedTag = props.fragment.isEdited ? `<edited ${isPendingDelete ? 'deleted' : ''}></edited>` : '';
const htmlContent = applyStrikethrough(html + editedTag, isPendingDelete);
return <RenderHTML html={props.source === 'email' ? `<email-comment>${htmlContent}</email-comment>` : `<comment>${htmlContent}</comment>`} />;
}

If we don't encode the html, The RenderHTML will consider it as starting of some tag. To avoid this we need to encode the html before passing it to RenderHTML

Here is sample -

Untitled.video.-.Made.with.Clipchamp.3.mp4

What changes do you think we should make in order to solve the problem?

  1. The one possible solution is to encode the html on backend and send that, when we change the name and API is called.
  2. To pass a new prop shouldEncodeHtml to ReportActionItemFragment component that will decide if we will encode the html before passing it to <RenderHTML/> component.
    The value for this prop will be decided in ReportActionItemMessage component, based on actionName
const shouldEncodeHtml = props.action.actionName === CONST.RPORT.ACTIONS.TYPE.POLICYCHANGELOG.UPDATE_NAME;.

This needs to be confirmed upon, for what report action types we need to encode the HTML.

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Jun 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

@arielgreen Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot
Copy link

melvin-bot bot commented Jun 7, 2023

@arielgreen Eep! 4 days overdue now. Issues have feelings too...

@arielgreen
Copy link
Contributor

This is okay to go external

@melvin-bot melvin-bot bot removed the Overdue label Jun 8, 2023
@arielgreen arielgreen added the External Added to denote the issue can be worked on by a contributor label Jun 8, 2023
@melvin-bot melvin-bot bot changed the title Web- Admin - Nothing appears if workspace is named <workspace_name starting with < [$1000] Web- Admin - Nothing appears if workspace is named <workspace_name starting with < Jun 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 8, 2023

Job added to Upwork: https://www.upwork.com/jobs/~014aa9edd793117534

@melvin-bot
Copy link

melvin-bot bot commented Jun 8, 2023

Current assignee @arielgreen is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 8, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 8, 2023

Triggered auto assignment to @MonilBhavsar (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@MonilBhavsar
Copy link
Contributor

Similar root cause as #17758

@mollfpr
Copy link
Contributor

mollfpr commented Jun 8, 2023

Agree with @MonilBhavsar. We can hold this, and I'll put this issue in to the test case on #20239

@arielgreen arielgreen changed the title [$1000] Web- Admin - Nothing appears if workspace is named <workspace_name starting with < [HOLD] [$1000] Web- Admin - Nothing appears if workspace is named <workspace_name starting with < Jun 9, 2023
@arielgreen arielgreen added Monthly KSv2 and removed Daily KSv2 labels Jun 9, 2023
@thesahindia
Copy link
Member

@mollfpr, can you confirm if #20009 will also be fixed in the same PR?

@mollfpr
Copy link
Contributor

mollfpr commented Jun 12, 2023

@thesahindia Nope, but I say we can hold it for a moment until it gets merged to avoid conflict.

@arielgreen
Copy link
Contributor

Reassigning, team change

@arielgreen arielgreen removed the Bug Something is broken. Auto assigns a BugZero manager. label Jun 16, 2023
@alexpensify
Copy link
Contributor

Weekly Update: On hold

1 similar comment
@alexpensify
Copy link
Contributor

Weekly Update: On hold

@alexpensify
Copy link
Contributor

Weekly update: On hold

2 similar comments
@alexpensify
Copy link
Contributor

Weekly update: On hold

@alexpensify
Copy link
Contributor

Weekly update: On hold

@alexpensify alexpensify changed the title [HOLD] [$1000] Web- Admin - Nothing appears if workspace is named <workspace_name starting with < [HOLD - App #20239] [$1000] Web- Admin - Nothing appears if workspace is named <workspace_name starting with < Aug 23, 2023
@alexpensify
Copy link
Contributor

Weekly update: On hold

@alexpensify
Copy link
Contributor

Weekly update: On Hold

3 similar comments
@alexpensify
Copy link
Contributor

Weekly update: On Hold

@alexpensify
Copy link
Contributor

Weekly update: On Hold

@alexpensify
Copy link
Contributor

Weekly update: On Hold

@alexpensify
Copy link
Contributor

Weekly update: On Hold but looks like the PR might get moving again

@alexpensify
Copy link
Contributor

Weekly update: On Hold

6 similar comments
@alexpensify
Copy link
Contributor

Weekly update: On Hold

@alexpensify
Copy link
Contributor

Weekly update: On Hold

@alexpensify
Copy link
Contributor

Weekly update: On Hold

@alexpensify
Copy link
Contributor

Weekly update: On Hold

@alexpensify
Copy link
Contributor

Weekly update: On Hold

@alexpensify
Copy link
Contributor

Weekly update: On Hold

@alexpensify
Copy link
Contributor

@MonilBhavsar - since #20239 (comment) is closed, should we close this one too? Thanks for the update!

@alexpensify
Copy link
Contributor

Weekly Update: @MonilBhavsar any news here for my last question?

@alexpensify
Copy link
Contributor

Weekly update: Waiting for a reply, I've sent a message in chat to try to figure out if we should close this one.

@MonilBhavsar MonilBhavsar changed the title [HOLD - App #20239] [$1000] Web- Admin - Nothing appears if workspace is named <workspace_name starting with < [$1000] Web- Admin - Nothing appears if workspace is named <workspace_name starting with < Dec 12, 2023
@MonilBhavsar
Copy link
Contributor

This issue is most probably fixed. We can retest and close

Copy link

melvin-bot bot commented Dec 13, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@alexpensify
Copy link
Contributor

Weekly Update: I need to retest to confirm the next steps.

Copy link

melvin-bot bot commented Dec 20, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@alexpensify
Copy link
Contributor

Ok, there we go, we can close this out because it's not appearing in the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants