I am using Wordpress Eazyest gallery to create 2000 galleries. Some files have double or triple dashes in filenames. For instance: abc---def.jpg
On Wordpress admin and front end they get replaced, this file gets the name abc-def.jpg so they become broken links / sources.
Is there a way I can replace all ---'s or --'s in a folder with a single - character using SSH? I am on Ubuntu 12.04. Any other fix for this on Wordpress core is also welcome. Tried commenting out this line on /wp-includes/formatting.php but did not work:
$static_characters = array_merge( array( '---', ' -- ', '--', ' - ', 'xn–', '...', '``', '\'\'', ' (tm)' ), $cockney );