WordPress 3.9 breaks invalid permalinks.. code fix possible?

If you have access to your database you can run the following query. I had run into a similar issue a while back.

UPDATE wp_posts SET post_name = REPLACE(post_name, '---', '-')

This will bulk replace every ‘—‘ with a single ‘-‘ in the post_name. It may also be wise to run the same command on the ‘guid’ field.

Perhaps someone has a better solution, but this worked for me in the past.