Firefox fix for bad search-and-replace