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.

Is it possible to force WP to ignore multiple whitespaces so in the frontend so there’s only one visible?

It’s because when my client writes something in the editor sometimes he enters two spaces instead of one and doesn’t notice that.

I was quite confused about the fact that multiple whitespaces aren’t ignored automatically because in the source code there is a double whitespace " " which to my mind is ignored by all browsers, not "  " or   .

share|improve this question

1 Answer 1

Not aware of a global setting to do this but you have a few options.

Use add_filter( 'the_content', 'filter_function_name' ) and replace the double spaces. Generally a bad idea because you'd have to account for the valid use of double spaces.

Install a plugin like 'After the Deadline' or similar that shows spelling and typo errors. Of course you can't force the user to accept the changes/corrections.

share|improve this answer
    
Thanks for your help! –  user1706680 Nov 5 '12 at 21:12

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.