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

fix(links): embedded links with escaped chars [e.g. plus] (WPB-4402) #2268

Merged
merged 4 commits into from
Sep 25, 2023

Conversation

mchenani
Copy link
Member

@mchenani mchenani commented Sep 25, 2023

BugWPB-4402 [Android] Links not handled properly when including https and special characters


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

When the embedded link in a message, was encoded with escape chars such as +, we were decoding it unnecessary and that was causing an error in detecting the url as invalid one, in the result we were adding an extra schema [https] to the valid link.

Issues

Adding an extra schema [https] to the valid link with escape chars.

Causes (Optional)

Unneeded decoding.

Solutions

Removed the unneeded decoding, and adding more tests.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Have an embedded link like: https://google.com/this+is+a+test, the link the app tried to open should be the same and with only one https.

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 25, 2023

Test Results

613 tests  +1   612 ✔️ +1   8m 14s ⏱️ + 2m 12s
  88 suites ±0       1 💤 ±0 
  88 files   ±0       0 ±0 

Results for commit ccd5c2e. ± Comparison against base commit bc3af58.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@AndroidBob
Copy link
Collaborator

Build 939 succeeded.

The build produced the following APK's:

@github-actions
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@ohassine ohassine added this pull request to the merge queue Sep 25, 2023
@github-actions
Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Sep 25, 2023
@AndroidBob
Copy link
Collaborator

Build 952 succeeded.

The build produced the following APK's:

@mchenani mchenani added this pull request to the merge queue Sep 25, 2023
Merged via the queue into develop with commit 9311af3 Sep 25, 2023
14 checks passed
@mchenani mchenani deleted the fix/embedded_links_with_escaped_chars_WPB-4402 branch September 25, 2023 13:49
mchenani added a commit that referenced this pull request Oct 18, 2023
…2268)

Co-authored-by: Oussama Hassine <oussama.has100@gmail.com>
(cherry picked from commit 9311af3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants