-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2023-10-09] [$1000] Chat - If url ends with slash, then ending double quote is shown as link #24367
Comments
Triggered auto assignment to @greg-schroeder ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.When users input URLs in the chat application that end with a slash and then immediately close with a double quote, the application incorrectly includes the double quote as part of the URL link. What is the root cause of that problem?The root cause of this problem lies in the regex pattern used to detect URLs in the chat text. Specifically, the pattern in URL_PATH_REGEX does not exclude a trailing double quote " after a slash /, leading to incorrect URL detection. What changes do you think we should make in order to solve the problem?To resolve this issue, we need to modify the URL_PATH_REGEX regex pattern in Url.js file to ensure it doesn't consider a trailing double quote as part of the URL. This can be achieved by adding a negative lookahead (?!") to the end of the regex pattern. The adjusted URL_PATH_REGEX is as follows: const URL_PATH_REGEX = `(?:${addEscapedChar('[.,=(+$!*]')}?\\/${addEscapedChar('[-\\w$@.+!*:(),=%~]')}*${addEscapedChar('[-\\w~@:%)]')}|\\/)*(?!")`; What alternative solutions did you explore? (Optional) |
@lanitochka17 can you clarify which platforms this occurs on? |
Job added to Upwork: https://www.upwork.com/jobs/~01a579e05c4814caf9 |
Current assignee @greg-schroeder is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
📣 @gzqyl! 📣
|
Contributor details |
I think the problem is to know what we want, do we accept quotes like this "" after the .com or not ? And do we accept escaped quotes like this: On slack they have different behaviour for the two. |
And in slack if you don't have a / " is not recognized either. If we want to remove both cases we should remove quot in this line: |
What do you think about the above, @parasharrajat? |
@situchan Feel free to continue reviewing this... I won't be able to review this soon.. cc: @greg-schroeder Please assign @situchan |
📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Sure - assigned you @situchan |
@greg-schroeder, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
@greg-schroeder |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
@agilejune thanks for letting me know. I will just process the issue normally and will let you know as we move towards payment @Antasel already had an offer in Upwork and it was accepted, so we should be able to pay the account normally for the work he completed |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.75-12 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-09. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue: As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Sorry for delay, was OOO. Processing today. |
Automation test cases should cover regression test |
Payment summary: Contributor: @Antasel $1000 Paid out @agilejune fyi |
@greg-schroeder can you please check #24367 (comment)? |
will fire regression test using automation steps |
oh yes @situchan sorry, forgot. will do now - done |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
"om https://www.she.com"
Expected Result:
Irrespective of url ends with/without slash, url alone must be displayed as link and not ending double quote
Actual Result:
If url ends with slash, then ending double quote is shown as link. If url ends without slash, then correctly url alone displayed as link
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.52.3
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
Bug6159871_double.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: