I have quote module. Ckeditor adds

 

and brokes the quote. Any solution?

Comments

Alcaparra’s picture

I have quote module. Ckeditor adds <'p>&nb'sp;<'/p> and brokes the quote. Any solution?

gagarine’s picture

DanilaD’s picture

Subscribing, I have the same problem.

DanilaD’s picture

Project: CKEditor 4 - WYSIWYG HTML editor » Quote
Version: 6.x-1.0 » 6.x-1.1-beta2
Status: Active » Needs review
StatusFileSize
new544 bytes

Found a solution. Edit file quote.module, function _quote_filter_process. Add the lines from attached file just after the following two lines

function _quote_filter_process($text) {
  if (stristr($text, '[quote')) {

Attached code will replace <'p>many spaces, and a tab, and a new line [quote=...]<'/p> introduced by CKEditor with simply [quote=...], the same will be done for closing [/quote], and then Quote module can do it's work.

If in your case CKEditor adds some more stuff, please attach a text file which shows exactly how it looks like.

wwalc’s picture

I haven't tried it, but setting enter mode to "BR" in CKEditor administration area may fix the problem as well.

DanilaD’s picture

StatusFileSize
new453 bytes

Compressed it into one regular expression instead of two. Guidelines are the same — in the original quote.module, insert lines from the attached file just after

function _quote_filter_process($text) {
  if (stristr($text, '[quote')) {
DanilaD’s picture

Version: 6.x-1.1-beta2 » 6.x-1.1

The code change that I suggested in #6 is still applicable in the new Quote 6.x-1.1.

Benj’s picture

This is what's occurring for me. (CKediitor 3.1)

I start out with this, a regular post or comment:

<p>
This module adds a 'quote' link below nodes and comments. When clicked, the contents of the node or comment are placed into a new comment enclosed with special markup that indicates it is quoted material. 
</p>

After clicking the quote button CKeditor has this:

<p>
  [quote=username]
</p>
<p>
This module adds a 'quote' link below nodes and comments. When clicked, the contents of the node or comment are placed into a new comment enclosed with special markup that indicates it is quoted material. 
</p>
<p>
[/quote]
</p>

After saving and opening the node view, this is rendered:

<p></p>
<div>
  <b>dcovrett wrote:</b>
  <blockquote>
    <p>
    I am having the same problem. My 5 month old and my 3yr old. Norah (3months) jumps and bites at Jasmine (3 1/2yrs) but sometimes it goes the other way. Jasmine will shove toys in Norahs face wanting to play, I am ok with the play it just turns rough so I dont allow any play in the house. I feel like I have to keep them separate but they love being together. Please someone tell me that this will end soon. I am tired! LOL<img width="20" height="20" src="http://www.gentledoberman.com/sites/all/modules/contrib/ckeditor/ckeditor/plugins/smiley/images/regular_smile.gif">&nbsp;Any advise would be greatly appreciated!
    </p>
    <p></p>
  </blockquote>
</div>

Starminder’s picture

subscribe

Zen’s picture

Version: 6.x-1.1 » 6.x-2.x-dev
Status: Needs review » Needs work

Where has this been tested? How does it work with other WYSIWYGs?

WildBill’s picture

Title: Ckeditor brokes quote » Ckeditor breaks quote

I just increased the weight of the Quote filter so that it was the last filter to be run, and that fixed it for me (without using the patch above). I know the README says to put the Quote filter before the Linebreak filter, but I put it after, and it solved the problem mentioned in this issue, without any side effects so far.

fadgadget’s picture

Thanks Bill. I came here looking for a solution and i am glad i found yours. Works great for me.

Zen’s picture

Category: bug » support
Status: Needs work » Fixed

Marking as fixed as per #11. Thanks WildBill :)
-K

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.