When determining a frontend, local URL in the theme customizer, match the home URL without a trailing slash.

props SergeyBiryukov.
fixes .


git-svn-id: https://develop.svn.wordpress.org/trunk@25681 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-10-03 01:49:59 +00:00
parent a59daf91cf
commit 2068a3e6da

@ -560,7 +560,12 @@
// and check if it's allowed. If not, try the original URL.
$.each([ to.replace( rscheme, self.scheme() ), to ], function( i, url ) {
$.each( self.allowedUrls, function( i, allowed ) {
if ( 0 === url.indexOf( allowed ) ) {
var path;
allowed = allowed.replace( /\/+$/, '' );
path = url.replace( allowed, '' );
if ( 0 === url.indexOf( allowed ) && /^([/#?]|$)/.test( path ) ) {
result = url;
return false;
}