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

[stable30] fix(link): Don't throw exception on invalid URL href #6796

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Dec 17, 2024

Backport of PR #6794

When pasting strings with invalid URLs, `new URL()` in `renderHTML()` of
the Link extension threw an error, which made the paste parser choke.

We should catch this exception and handle it gracefully to not break
HTML parsing completely with invalid URLs.

Signed-off-by: Jonas <jonas@freesources.org>
@backportbot backportbot bot requested review from juliusknorr and mejo- December 17, 2024 17:28
@backportbot backportbot bot added bug Something isn't working 3. to review labels Dec 17, 2024
@backportbot backportbot bot added this to the Nextcloud 30.0.5 milestone Dec 17, 2024
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 53.60%. Comparing base (dfca2d4) to head (005b208).
Report is 4 commits behind head on stable30.

Files with missing lines Patch % Lines
src/marks/Link.js 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           stable30    #6796      +/-   ##
============================================
- Coverage     53.60%   53.60%   -0.01%     
============================================
  Files           116      116              
  Lines          2580     2582       +2     
  Branches        526      526              
============================================
+ Hits           1383     1384       +1     
- Misses         1069     1070       +1     
  Partials        128      128              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mejo- mejo- merged commit bee20ee into stable30 Dec 17, 2024
63 checks passed
@mejo- mejo- deleted the backport/6794/stable30 branch December 17, 2024 21:19
@blizzz blizzz mentioned this pull request Jan 8, 2025
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant