Customize: Fix logic inversion in determining whether a URL is previewable which prevented previewing anything but homepage.

Fixes regression introduced in [38890].

See #38409.
Fixes #38492.

Built from https://develop.svn.wordpress.org/trunk@38926


git-svn-id: http://core.svn.wordpress.org/trunk@38869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter
2016-10-25 20:53:29 +00:00
parent 2f263fce99
commit 54465a68db
5 changed files with 5 additions and 5 deletions

View File

@@ -4173,7 +4173,7 @@
_.find( parsedCandidateUrls, function( parsedCandidateUrl ) {
return ! _.isUndefined( _.find( previewer.allowedUrls, function( allowedUrl ) {
parsedAllowedUrl.href = allowedUrl;
if ( urlParser.protocol === parsedAllowedUrl.protocol && urlParser.host === parsedAllowedUrl.host && 0 === parsedAllowedUrl.pathname.indexOf( urlParser.pathname ) ) {
if ( urlParser.protocol === parsedAllowedUrl.protocol && urlParser.host === parsedAllowedUrl.host && 0 === urlParser.pathname.indexOf( parsedAllowedUrl.pathname.replace( /\/$/, '' ) ) ) {
result = parsedCandidateUrl.href;
return true;
}

File diff suppressed because one or more lines are too long