HTMLForm: Avoid usage of non-standard 'flags' parameter of String#replace
Chrome (and most other browser) don't support the non-standard 'flags' argument to String#replace (implemented by Mozilla Firefox). Instead pass a RegExp object with those flags. Bug: 68050 Change-Id: Ia463002e708975eed1a5c3657f2e1a4d6b4e74de
This commit is contained in:
parent
6f02280988
commit
9538e7d77c
2 changed files with 5 additions and 1 deletions
|
|
@ -862,6 +862,9 @@ return array(
|
|||
),
|
||||
'mediawiki.htmlform' => array(
|
||||
'scripts' => 'resources/src/mediawiki/mediawiki.htmlform.js',
|
||||
'dependencies' => array(
|
||||
'jquery.mwExtension',
|
||||
),
|
||||
'messages' => array( 'htmlform-chosen-placeholder' ),
|
||||
),
|
||||
'mediawiki.icon' => array(
|
||||
|
|
|
|||
|
|
@ -363,7 +363,8 @@
|
|||
$ul = $( this ).prev( 'ul.mw-htmlform-cloner-ul' );
|
||||
|
||||
html = $ul.data( 'template' ).replace(
|
||||
$ul.data( 'uniqueId' ), 'clone' + ( ++cloneCounter ), 'g'
|
||||
new RegExp( $.escapeRE( $ul.data( 'uniqueId' ) ), 'g' ),
|
||||
'clone' + ( ++cloneCounter )
|
||||
);
|
||||
|
||||
$li = $( '<li>' )
|
||||
|
|
|
|||
Loading…
Reference in a new issue