MyBB Community Forums

Full Version: quoting issues..possible bug?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
a few members on my forum had noticed that sometimes when quoting a post and replying, they'll end up writing their reply inside the quote box because the ending [/quote] is at the VERY bottom of the text editor area. I don't have a screenshot of this, but it did happen to me and without even thinking about it, I fixed it before taking any screenshots.

is this a known issue?

see here for the reported issue by a forum member of my board:
http://paforliberty.com/forum/thread-quoting
It's not a bug if a user ends up writing inside the quote tags...
Make sure the [/quote] ending tag exists.
(2011-01-03, 08:45 PM)Shukaku Wrote: [ -> ]It's not a bug if a user ends up writing inside the quote tags...
Make sure the
ending tag exists.
[/quote]

why is the ending quote showing up at the very end of the text editor though?

for example, shouldn't it be like this:
<quote>this is some text</quote>
:forum user reply:
We kinda need a screenshot.
It's because the MyBB Parser is parsing the ending of the quote tag too early. It thinks the first [/quote] tag is the end of the quote MyCode, when it is not.
Sometimes people put loads of returns (i.e. the Enter button) after their reply. Example, try and reply to this thread: http://community.mybb.com/thread-85546.html It shows fine when you view the thread, but I pressed the return button a load of times, and when you quote it, it quotes those, and pushes the [/quote] tag down.
(2011-01-03, 09:00 PM)pyridine Wrote: [ -> ]We kinda need a screenshot.

if you read my original post, you'll notice that I had fixed my reply to a quoted message that was inside the quote before taking the screenshot. Wink

(2011-01-03, 09:04 PM)MattRogowski Wrote: [ -> ]Sometimes people put loads of returns (i.e. the Enter button) after their reply. Example, try and reply to this thread: http://community.mybb.com/thread-85546.html It shows fine when you view the thread, but I pressed the return button a load of times, and when you quote it, it quotes those, and pushes the
tag down.
[/quote]

that makes sense. just odd that the message appears to look fine but it has all those extra spaces. is there a way to correct this?
Try this... in ./inc/functions_posting.php, line 213:

$plugins->run_hooks_by_ref("parse_quoted_message", $quoted_post);

Before this, add:

$quoted_post['message'] = rtrim($quoted_post['message']);

See if it's better then.
(2011-01-03, 09:37 PM)MattRogowski Wrote: [ -> ]Try this... in ./inc/functions_posting.php, line 213:

$plugins->run_hooks_by_ref("parse_quoted_message", $quoted_post);

Before this, add:

$quoted_post['message'] = rtrim($quoted_post['message']);

See if it's better then.

Matt,

that appears to work fine. might be handy to add into the next release.
bumping this because I'm seeing this occur more often on my forum that runs 1.6.5

looking at the above code provided by Matt, on line 213, I see this:
$quoted_post = $plugins->run_hooks("parse_quoted_message", $quoted_post);

instead of just this
$plugins->run_hooks_by_ref("parse_quoted_message", $quoted_post);

should the 2nd bit of code still go before the code I provided? is there a way for this to get added to the core product for the next release?