Fixing backreference bug in WebKit
This commit is contained in:
@@ -484,6 +484,8 @@
|
|||||||
debug('searching for ' + searchStr + ' to replace with ' + matches[i]);
|
debug('searching for ' + searchStr + ' to replace with ' + matches[i]);
|
||||||
rt = rt.replace( searchStr, matches[i] );
|
rt = rt.replace( searchStr, matches[i] );
|
||||||
}
|
}
|
||||||
|
// remove any excess backreferences from the replace string
|
||||||
|
rt = rt.replace( /\$[\d]/g, '' );
|
||||||
repText = rt;
|
repText = rt;
|
||||||
} else if ( repText == '' ) {
|
} else if ( repText == '' ) {
|
||||||
debug('Search string is empty');
|
debug('Search string is empty');
|
||||||
|
|||||||
Reference in New Issue
Block a user