Title: em-dash replacement
Last modified: August 18, 2016

---

# em-dash replacement

 *  [marky](https://wordpress.org/support/users/marky/)
 * (@marky)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/em-dash-replacement/)
 * I appreciate the punctuation filter, but I’d prefer that a double dash (–) be
   replaced by an em-dash, not an en-dash. Is there any way to configure WP to do
   this?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [miahz](https://wordpress.org/support/users/miahz/)
 * (@miahz)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/em-dash-replacement/#post-52060)
 * you can enable the textile plugin, which, i believe, uses double dashes for em-
   dashes.
 *  Thread Starter [marky](https://wordpress.org/support/users/marky/)
 * (@marky)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/em-dash-replacement/#post-52083)
 * The problem is Textile adds other strange markup and features I don’t really 
   want. For example, in the following sentence, “This is–and I can’t emphasise 
   this enough–a sentence,” Textile assumes I want to wrap del tags around the inner
   phrase rather than simply replace them with em-dashes. (Yes, I’m from the puncutation
   school that doesn’t surround em-dashes with spaces 🙂
    Incidentally, I did find
   a way to alter the default filter to do what I want. There’s a very simple mapping
   at the beginning of the functions-fomatting.php file that can be altered. 🙂
 *  [iamPariah](https://wordpress.org/support/users/iampariah/)
 * (@iampariah)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/em-dash-replacement/#post-52975)
 * I’m a little late to this discussion, but I wholly agree with Marky. Em dashes
   indicate related but separate thoughts and clauses from the surrounding sentence.
   The space-em-space convention is a copywriting device popular online because 
   it allows the sentence to wrap at the em placement if needed–which, of course,
   makes it useful but not grammatically correct.
 * I too am annoyed by WordPress making the assumption that a double-hyphen should
   be an en dash and a triple-hyphen an em dash. Who types that way?
 * I’m going to troll around and play with the code to see if I can find where to
   fix this erroneous text replacement implementation.
 *  [iamPariah](https://wordpress.org/support/users/iampariah/)
 * (@iampariah)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/em-dash-replacement/#post-52976)
 * In WP 1.5, open \wp-includes\functions-formatting.php and look for the below 
   lines:
    ` $curl = str_replace('---', '& #8212;', $curl); $curl = str_replace('--','&#
   8212; ', $curl); $curl = str_replace('--', '& #8211;', $curl);  Replace with:
   $curl = str_replace('--', '& #8212;', $curl); $curl = str_replace(' -- ', ' &#
   8212; ', $curl); $curl = str_replace('---', '& #8211;', $curl);
 * Remember to take out the space between & and # in each of the above; the space
   was necessary to make it display the code here.
 * 8212 is the entity for em dashes, 8211 the entity for en dashes. I changed my
   ens to a triple-hyphen, but you may want something else (for example, all hyphens).`

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘em-dash replacement’ is closed to new replies.

 * In: [Requests and Feedback](https://wordpress.org/support/forum/requests-and-feedback/)
 * 4 replies
 * 3 participants
 * Last reply from: [iamPariah](https://wordpress.org/support/users/iampariah/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/em-dash-replacement/#post-52976)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
