-
Notifications
You must be signed in to change notification settings - Fork 800
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Boost: Cornerstone Pages list UI tweaks (#40163)
- Loading branch information
Showing
4 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
projects/plugins/boost/app/assets/src/js/lib/utils/is-same-site-url.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Returns true if the provided URL is from the same domain as the provided site URL. | ||
* | ||
* @param {URL} url URL to check. | ||
* @param {URL} siteUrl Site URL to compare against. | ||
*/ | ||
export function isSameSiteUrl( url: URL, siteUrl: URL ): boolean { | ||
const urlSanitized = url.origin + url.pathname.replace( /\/$/, '' ) + '/'; | ||
const siteUrlSanitized = siteUrl.origin + siteUrl.pathname.replace( /\/$/, '' ) + '/'; | ||
return urlSanitized.startsWith( siteUrlSanitized ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
projects/plugins/boost/changelog/fix-boost-cornerstone-pages-duplicate-home-urls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Significance: patch | ||
Type: fixed | ||
Comment: Fix for an unreleased feature. | ||
|
||
|