-
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
Any links pasted into e.cash that includes a colon :
break causing only the portion before the colon to be hyperlinked
#4105
Comments
Triggered auto assignment to @Gonals ( |
Triggered auto assignment to @trjExpensify ( |
We'll probably have to tweak the markdown a bit to get this to work correctly. |
:
break causing only the portion before the colon to be hyperlinked
Triggered auto assignment to @marcaaron ( |
ProposalI just adjusted the Path Regex to this
And it is working fine and the whole test suite passed. It fixes the main issue. There is another issue here #4105 (comment). which I will fix in the upcoming steps. ExplanationWe escape matching strings before applying scanning rules. Escaping converts a few chars as follows:
Our Url regex didn't encounter escaped Symbols thus parsing is failing for FixWe have to update the URL regex to match the escaped Symbols as well. For example, Path regex would be converted to
This fixes the other issue. |
Interesting, what's the difference with what looks like a @mallenexpensify seems to have found this one as well, but the single quotation mark ( |
Ok, I found the issue with
So at the time of matching |
The |
Again, I think escaping the URL with htmlentities will make it incorrect. so it's is better to unescape it before matching the URLs. Edit: So I have found the fix for that as well and we may have to update a few of regex to match the escaped version of
which will fix future issues. Updating proposal... |
PR is up Expensify/expensify-common#396. |
@trjExpensify, @marcaaron Whoops! This issue is 2 days overdue. Let's get this updated quick! |
This is done, closing it out. Reopen if I missed something, Gents! |
Reopening this issue since @mallenexpensify was able to reproduce here https://expensify.slack.com/archives/C01GTK53T8Q/p1635954172411200 |
I'm thinking, for issues like this that are likely to be recurring as we find variations, we shouldn't continue to reopen this one but open a new one each time. In the new issue, we can link back to this, gather examples then decide if/when we want a contributor to work on. @marcaaron @trjExpensify @parasharrajat , y'all agree? |
Agreed!
…On Thu, Nov 4, 2021 at 3:22 PM Matt Allen ***@***.***> wrote:
I'm thinking, for issues like this that are likely to be recurring as we
find variations, we shouldn't continue to reopen this one but open a new
one each time. In the new issue, we can link back to this, gather examples
then decide if/when we want a contributor to work on.
@marcaaron <https://github.com/marcaaron> @trjExpensify
<https://github.com/trjExpensify> @parasharrajat
<https://github.com/parasharrajat> , y'all agree?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4105 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3246ICBYI4PVAACJFQO4TUKKXOFANCNFSM5APPJT4Q>
.
--
*Tom Rhys Jones *
*Expensify*
|
I think parsing links is really giving us a hard time and we are hitting limitations of js regex. Should we reconsider md parser for links? No preference @mallenexpensify |
I agree with @mallenexpensify opening new tickets for other scenarios are easier to follow than reopening old ones. Let me know if we should start with this variation and create another ticket. |
Sure. This link maybe looks like it's broken for another reason so we can close this. |
@isagoico can you create a brand new issue and include a link back to this? Thanks |
Issue created here 🔝 |
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:
A. https://www.google.com/maps/place/%E9%9D%92%E5%B3%B6%E9%80%A3%E7%B5%A1%E8%88%B9%E4%B9%97%E5%A0%B4/@33.7363156,132.4877213,17.78z/data=!4m5!3m4!1s0x3545615c8c65bf7f:0xb89272c1a705a33f!8m2!3d33.7366776!4d132.4878843
B. https://www.google.com/maps/place/The+Flying+Saucer/@42.4043314,-86.2742418,15z/data=!4m5!3m4!1s0x0:0xe28f6108670216bc!8m2!3d42.4043316!4d-86.2742121
Expected Result:
Links including colons should be correctly hyperlinked. In this example when clicked, should redirect to:
A. The cat island in Japan (and yes, it's an island full of cats)
B. The Flying Saucer in South Haven, MI
Actual Result:
Both links are not hyperlinked correctly and cut off after the colon.
Workaround:
User has to manually select the full link and paste it in the URL bar.
Platform:
Where is this issue occurring?
Web ✔️
iOS ✔️
Android ✔️
Desktop App ✔️
Mobile Web ✔️
Version Number: 1.0.79-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Most Google Maps links are affected by this because they contain colons in the URL.
Please check the screenshot in
Actual result
.I will try different links from other sites and, if I find more affected by this, will post the ones that have the same issue in comments.
Upwork Post: https://www.upwork.com/jobs/~017aff792b5b4f4a79
View all open jobs on Upwork
From @mallenexpensify https://expensify.slack.com/archives/C01GTK53T8Q/p1626278479245000
The text was updated successfully, but these errors were encountered: