Bug 747412 - Installing Favimon does not show the right parenthesis on the desktop shortcut or start menu [r=felipe]
authorEdward Lee <edilee@mozilla.com>
Thu, 26 Apr 2012 22:11:43 -0700
changeset 92590 add831dc812ed83f807f6950765f434311f68d54
parent 92589 877276e291b847d84b43cbacf41351cdbb36a81e
child 92591 8eaab92b32206d90f2056fc7b19c77893b27419e
push id22544
push useremorley@mozilla.com
push dateFri, 27 Apr 2012 11:53:27 +0000
treeherdermozilla-central@d871849ac3a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs747412
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 747412 - Installing Favimon does not show the right parenthesis on the desktop shortcut or start menu [r=felipe] Strip whitespace at the end instead of trailing non-alphanumeric.
browser/modules/WebappsInstaller.jsm
--- a/browser/modules/WebappsInstaller.jsm
+++ b/browser/modules/WebappsInstaller.jsm
@@ -683,17 +683,17 @@ function sanitize(aStr) {
 
 /**
  * Strips all non-word characters from the beginning and end of a string
  */
 function stripStringForFilename(aPossiblyBadFilenameString) {
   //strip everything from the front up to the first [0-9a-zA-Z]
 
   let stripFrontRE = new RegExp("^\\W*","gi");
-  let stripBackRE = new RegExp("\\W*$","gi");
+  let stripBackRE = new RegExp("\\s*$","gi");
 
   let stripped = aPossiblyBadFilenameString.replace(stripFrontRE, "");
   stripped = stripped.replace(stripBackRE, "");
   return stripped;
 }
 
 /**
  * Finds a unique name available in a folder (i.e., non-existent file)