File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,16 @@ export const updateSiteUrlToLocal = async ( siteId: string ) => {
1919 const oldUrl = currentSiteUrl . trim ( ) ;
2020 const urlWithoutProtocol = oldUrl . replace ( / ^ h t t p s ? : \/ \/ / , '' ) ;
2121
22- const oldUrlVariants = [ `http://${ urlWithoutProtocol } ` , `https://${ urlWithoutProtocol } ` ] ;
22+ const oldUrlVariants = [
23+ `http://${ urlWithoutProtocol } ` ,
24+ `https://${ urlWithoutProtocol } ` ,
25+ // e.g. "posterUrl" for videos uses encoded URLs
26+ `http%3A%2F%2F${ urlWithoutProtocol } ` ,
27+ `https%3A%2F%2F${ urlWithoutProtocol } ` ,
28+ // e.g. Elementor plugin uses escaped URLs
29+ String . raw `http:\/\/${ urlWithoutProtocol } ` ,
30+ String . raw `https:\/\/${ urlWithoutProtocol } ` ,
31+ ] ;
2332
2433 for ( const urlToReplace of oldUrlVariants ) {
2534 const { stderr, exitCode } = await server . executeWpCliCommand (
You can’t perform that action at this time.
0 commit comments