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

Normalize protocol relative URL handling #1882

Merged
merged 7 commits into from
Jul 23, 2024

Conversation

caendesilva
Copy link
Member

@caendesilva caendesilva commented Jul 23, 2024

Changes

  1. New Helper Method

    • Added Hyperlinks::isRemote() to improve URL checking
  2. Featured Image Updates

    • Updated featured image method to use extracted logic
    • Deprecated FeaturedImage::isRemote() method
      • Replaced by Hyperlinks::isRemote()
  3. URL Handling Improvements

    • Normalized remote URL checking across the codebase
    • Updated Hyde::asset() method
      • Now considers protocol-relative URLs (//) as remote

Notes

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (3e84737) to head (aff424c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master     #1882   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity      1764      1764           
===========================================
  Files            182       182           
  Lines           4704      4704           
===========================================
  Hits            4704      4704           

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

Side effect that the `Hyde::asset()` method now considers protocol relative URLs `//` to be remote
@caendesilva caendesilva marked this pull request as ready for review July 23, 2024 14:11
@caendesilva caendesilva enabled auto-merge July 23, 2024 14:11
@caendesilva caendesilva disabled auto-merge July 23, 2024 14:11
@caendesilva caendesilva merged commit aa06e42 into master Jul 23, 2024
23 checks passed
@caendesilva caendesilva deleted the normalize-protocol-relative-url-handling branch July 23, 2024 14:12
caendesilva added a commit that referenced this pull request Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Hyde::asset() method to consider protocol relative URLs // to be remote
1 participant