How to Fix the Democracy Plugin n Problem

I noticed during a recent WordPress upgrade, the Democracy Plugin started adding an extra "n" each time you saved the post:

Democracy Plugin n Problem

Here's how to fix the problem:

(1) With a text editor, open "democracy.php" – it's located in the democracy subfolder in the plugin folder.

(2) Locate the line below (around line number 331):

return preg_replace('/{democracy[\w\W\s^}]*?}/', '\n<div>\\0</div>', $content);

(3) Change the last set of single quotes into double quotes:

return preg_replace('/{democracy[\w\W\s^}]*?}/', "\n<div>\\0</div>", $content);

That's it. That should take care of the Democracy Plugin's extra n problem.

3 thoughts on “How to Fix the Democracy Plugin n Problem

  1. I have been trying to fix this all day. my code doesnt have that return preg_replace line in it anywhere ??? weird!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>