Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When I add title post as: this - is - post

I view code source : this – is – post

How to format code source as: this - is - post

Error: I'm user jQuery UI autocomplete code source ["this – is – post","this – is – post", ] and views html autocomplete input is this – is – post

How to fix in jQuery or change echo code source?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

WordPress makes number of typographical replacements, related to dashes. You can read through the How WordPress Handles Dashes and Hyphens for full details, but in short your specific case is [space][hyphen][space] getting replaced with [space][en-dash][space].

You will have to step through your code to make sense at which point it goes wrong and turns into visible unwanted entity rather than character.

Depending on how much of this you have the easy fix might be just to type actual en-dash character (Alt+0150 on numpad on Windows) instead of "minus" hyphen.

share|improve this answer
    
Thanks! i'm used remove_filter( 'the_title', 'wptexturize' ) and the questions done. –  Amaury Loiseau Apr 8 at 1:54

Your Answer

 
discard

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.