Josh Eaton Yes, A Blog.

Remove Double Space Plugin

Remove Double Space is a WordPress plugin that on display, will replace duplicate whitespace (including unicode whitespace characters) in between sentences or elsewhere within posts with a single space. It is useful if multiple contributors use different styles for sentence spacing or as a catch-all for any unintended extra whitespace.

This enables consistency in a blog with multiple contributors where one writer uses double spaces between sentences and another uses single spaces.

Download the plugin

If you like this plugin, consider buying me a cup of coffee!

Donate here

Update: The plugin is now hosted at WordPress.org. Use the download link above or click here for other information including the support forum.

Contact me if you have any suggestions, feedback or bugs.

Comments (5) Trackbacks (0)
  1. Great!

    Just what i need…

    Thank you.

  2. Looking at the code (i’m not a coder), this seems to replace the double spaces in the rendering when the_content is called. It does not change it in the database or when publishing/saving, etc. The advantage is it will just work with older posts. The disadvantage is it will add a bit of overhead when rendering pages, each and every time a page is displayed it runs the substitute. Am I wrong? Wouldnt it be better to force no double spaces when saving a post or publishing a post and then have a second part that gives the option to cleanup old posts?

  3. Brian,

    Thanks for your feedback. The main purpose of the plugin was to make all posts consistent, and the easiest way to do that was to filter the_content. The performance hit is negligible, although I admit I haven’t done extensive performance testing on it. The point was to not touch the database or affect the blogger’s editing experience (some people really love putting extra spaces in their writing) and just make sure the posts display consistently.

    I do plan on adding an option to remove posts upon save in a future release. Please let me know if you have any other feature requests.

    Thanks,

    Josh

  4. I have a feature request! So glad to see this, I’m a graphic designer who is firmly in the “one space” camp. But I was disappointed to see that this only appears to work on posts, not pages. Is there any way to tweak the plugin to filter double spaces on the latter?

  5. Whit,

    It works for me on pages. It should work for both. Do you have a link you can send me? I can take a look and see if I can tell what the issue is. You can use the contact form on my site if you’d prefer not to post it in the comments.


Leave a comment

(required)

No trackbacks yet.