I still think you’ll be better off with a text-editor that preprocesses the source text (Markdown or else) for typographic niceties and such. To automate it from the other end (i.e. Middleman doing this) you would need an custom extension that does the job before handing strings over to template-processor.
Depending on what exactly you want to change and what templating language you want to use (Markdown? Haml? Just plain HTML with Ruby ERB?), this will be HTML-safe or not. It would be nice to know more details: do you want to prepare an automated way for some content-author to generate content in Markdown, without caring about those non-breaking spaces? Or you want to automate this for you, as an web-dev preparing website structure, layout, partials, generic content, using ERB, HAML etc?
I’m obsessed with typographic niceties in my web-code (non-breaking spaces where appropriate, curly-qoutes, etc.), but in case of generic website structure (HAML layout, partials) I just use the text-editor that allows me to enter this easily, and in case of the content (usually Markdown) I use preprocessing scripts of just grep Find/Replace, depending on where, for whom, etc.