The first quote works fine, with and without preview.
However, when you click quote again and such produce a double quote and put some text after it, with every Preview click not only the double quote appear once more in the Preview, they are also DUPLICATED in the comment. It's not just a display/css problem.
An uninstall of the two modules "Better Formats" and "Advanced Forum" (which I had in my project) has not solved the problem. The editor is WYSIWYG module with TinyMCE.
See attachment for the result after a few preview clicks.
Thx for your work!
Comments
Comment #1
Golem07 commentedI can confirm this behaviour with WYSIWYG and Tinymce: The quotes are doubled in I preview a comments that holds quoted messages.
Comment #2
samuelsov commentedI have made a patch but i'm not sure it's the best way to do this.
Please comment.
Comment #3
itsnotme commentedFirst of all, the patch works fine here on my local machine :) Which makes me very happy.
As an almost-not-coder, the underlying problem seemed to be a double run of the text processing function when doing a preview(?), so your solution looks good for me.
Will test and implement it on my server tomorrow. Thank you!
Comment #4
morbiD commentedI've just run into this problem myself.
Looking at the code, the module inserts the quote when the page URL contains
?quote=1. The problem is that, as a result of clicking the "Quote" link, the action attribute of form#comment-form (and hence the target of the preview button) always includes?quote=1so the quote is inserted again every time the preview button is clicked.Therefore, would a more logical solution be to remove the
?quote=1from the form action, rather than just checking$form_stateevery time a comment is previewed?I made an alternative patch that kind of shows what I mean. It would be better done using a regex to match the right URL parameter if there is more than one but I didn't have time to figure it out so don't use the patch for anything other than testing.
Comment #5
simon georges commentedHi.
I confim the behaviour with WYSIWYG and ckEditor (but I guess the behaviour is here, whatever editor you use).
The patck worked fine as the problem is corrected, I just wonder if this is the best way to correct it. i'll still take it, it works really well ;)
Best Regards,
Comment #6
StudioARE commentedJust to include another editor, same with bueditor.
Could someone upload the patched module? I don't manage to get patch files working.
Just me or does it looks like development of this module has stalled?
Comment #7
drupalfan2 commentedBoth of above patches do not work.
Can you help please?
Comment #8
Sarenc commentedThe patch in #4 works for comments but not for node_comments. You need to add the same lines below
Making the entire function look like:
Comment #9
Zen commentedI'm not able to duplicate this with the latest stables of CKEditor, TinyMCE and WYSIWYG. Nested quotes, and lots of preview clicks give me the correct output.
Please confirm if this is still occurring.
Thank you,
-K
Comment #10
Zen commented