diff --git a/mozilla/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js b/mozilla/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js index 848c45949d0..48d4b1aa0be 100644 --- a/mozilla/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js +++ b/mozilla/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js @@ -551,7 +551,7 @@ nsHelperAppDialog.prototype = { // replaceInsert: Replace given insert with replacement text and return the result. replaceInsert: function( text, insertNo, replacementText ) { var result = text; - var regExp = eval( "/#"+insertNo+"/" ); + var regExp = new RegExp("#"+insertNo); result = result.replace( regExp, replacementText ); return result; } diff --git a/mozilla/mailnews/base/search/resources/content/searchTermOverlay.js b/mozilla/mailnews/base/search/resources/content/searchTermOverlay.js index 12f41340995..b193ba3c0ca 100644 --- a/mozilla/mailnews/base/search/resources/content/searchTermOverlay.js +++ b/mozilla/mailnews/base/search/resources/content/searchTermOverlay.js @@ -284,7 +284,7 @@ function initializeTermFromId(id) // id is of the form searchAttr // strlen("searchAttr") == 10 // turn searchAttr -> - var index = eval(id.slice(10)); + var index = parseInt(id.slice(10)); initializeTermFromIndex(index) } diff --git a/mozilla/mailnews/compose/resources/content/sendProgress.js b/mozilla/mailnews/compose/resources/content/sendProgress.js index f61a1edfea7..c6ed839440e 100644 --- a/mozilla/mailnews/compose/resources/content/sendProgress.js +++ b/mozilla/mailnews/compose/resources/content/sendProgress.js @@ -152,7 +152,7 @@ function loadDialog() function replaceInsert( text, index, value ) { var result = text; - var regExp = eval( "/#"+index+"/" ); + var regExp = new RegExp( "#"+index ); result = result.replace( regExp, value ); return result; } diff --git a/mozilla/xpfe/components/ucth/resources/helperAppDldProgress.js b/mozilla/xpfe/components/ucth/resources/helperAppDldProgress.js index 4a4d37be437..c373f0fec5e 100644 --- a/mozilla/xpfe/components/ucth/resources/helperAppDldProgress.js +++ b/mozilla/xpfe/components/ucth/resources/helperAppDldProgress.js @@ -103,7 +103,7 @@ var progressListener = { // Get current time. var now = ( new Date() ).getTime(); // If interval hasn't elapsed, ignore it. - if ( now - lastUpdate < interval && aMaxTotalProgress != "-1" && eval(aCurTotalProgress) < eval(aMaxTotalProgress) ) + if ( now - lastUpdate < interval && aMaxTotalProgress != "-1" && parseInt(aCurTotalProgress) < parseInt(aMaxTotalProgress) ) return; // Update this time. @@ -306,7 +306,7 @@ function loadDialog() function replaceInsert( text, index, value ) { var result = text; - var regExp = eval( "/#"+index+"/" ); + var regExp = new RegExp( "#"+index ); result = result.replace( regExp, value ); return result; } diff --git a/mozilla/xpfe/components/xfer/resources/downloadProgress.js b/mozilla/xpfe/components/xfer/resources/downloadProgress.js index 003806ce5e1..7f2612ec4d6 100644 --- a/mozilla/xpfe/components/xfer/resources/downloadProgress.js +++ b/mozilla/xpfe/components/xfer/resources/downloadProgress.js @@ -80,7 +80,7 @@ function getString( stringId ) { function replaceInsert( text, index, value ) { var result = text; - var regExp = eval( "/#"+index+"/" ); + var regExp = new RegExp( "#"+index ); result = result.replace( regExp, value ); return result; } @@ -194,7 +194,7 @@ function onProgress( bytes, max ) { && max != "-1" && - eval(bytes) < eval(max) ) { + parseInt(bytes) < parseInt(max) ) { return; }