Closed mattclough1 closed 2 years ago
@boutell alternative approach to this one. I couldn't see any benefit to using the relative://
protocol in the base URL, but lmk if that's necessary for some reason. All tests are currently passing.
Ah I see. I'll take a different approach. Interesting that the URL parser even allows a host without a top-level domain
It would need to, since on a local network that's not uncommon.
On Wed, Nov 17, 2021 at 12:06 PM Matt Clough @.***> wrote:
Ah I see. I'll take a different approach. Interesting that the URL parser even allows a host without a top-level domain
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apostrophecms/sanitize-html/pull/516#issuecomment-971779858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAH27OY2SWCQYLZMERHP6DUMPOKVANCNFSM5IFE5B5A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
--
THOMAS BOUTELL | CHIEF TECHNOLOGY OFFICER APOSTROPHECMS | apostrophecms.com | he/him/his
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Fix #504
This solution opts to replace the
relative
protocol of the URL parser's base URL with the special scheme protocolhttps
. This does not alter the original value in any way, but retains the ability to determine whether the given URL is relative.