Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.config.js |
— | — | @@ -502,9 +502,11 @@ |
503 | 503 | } |
504 | 504 | }, |
505 | 505 | open: function() { |
| 506 | + // Obtain the server name without the protocol. wgServer may be protocol-relative |
| 507 | + var serverName = mw.config.get( 'wgServer' ).replace( /^(https?:)?\/\//, '' ); |
506 | 508 | // Cache the articlepath regex |
507 | 509 | $(this).data( 'articlePathRegex', new RegExp( |
508 | | - '^' + $.escapeRE( mw.config.get( 'wgServer' ) + mw.config.get( 'wgArticlePath' ) ) |
| 510 | + '^https?://' + $.escapeRE( serverName + mw.config.get( 'wgArticlePath' ) ) |
509 | 511 | .replace( /\\\$1/g, '(.*)' ) + '$' |
510 | 512 | ) ); |
511 | 513 | // Pre-fill the text fields based on the current selection |