Just a thought, but I no longer like the idea of replacing hyphens prior to submitting them to the database. I believe that the text should be formatted only after retrieving it from the database.
"Be of the same mind toward one another. Do not set your mind on high things, but associate with the humble. Do not be wise in your own opinion." Romans 12:16