Revert "jquery.textSelection: Remove hardcoded checks for removed WikiEditor iframe...
[lhc/web/wiklou.git] / includes / Wiki.php
index 2ef1382..aed1f65 100644 (file)
@@ -542,7 +542,7 @@ class MediaWiki {
                        $request->getProtocol() == 'http'
                ) {
                        $oldUrl = $request->getFullRequestURL();
-                       $redirUrl = str_replace( 'http://', 'https://', $oldUrl );
+                       $redirUrl = preg_replace( '#^http://#', 'https://', $oldUrl );
 
                        if ( $request->wasPosted() ) {
                                // This is weird and we'd hope it almost never happens. This