WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a blog where I publish Linux tutorials. Some of the commands I listed have a -- before command-line arguments. e.g.: dpkg --get-selections.

The problem is that WordPress automatically switches -- to an – (–).

I know I could use the −− HTML entities, but the display is slightly different than the keyboard - sign.

What I want is to disable this behaviour of WP. Is there a way to solve this?

share|improve this question
Update: The function responsible for this is wptexturize... line 73 in formatting.php ... – adrian7 Dec 18 '12 at 11:41
up vote 0 down vote accepted

Problem solved with this gist https://gist.github.com/4329321 .

[notexturize]--[/notexturize] worked like a charm.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.