QuickReply Reloaded

A bug report - users with [ ] in username break quick quotes - QuickReply Reloaded

A bug report - users with [ ] in username break quick quotes

by BioLogIn » Tue Nov 07, 2017 11:57 am

With "quick quote" setting on, quotes of posts made by users with [ and ] in their usernames break the quote tag: https://tracker.phpbb.com/secure/attach ... dex222.png

Suggested fix - in quickreply_plugins.js find

Code: Select all

				if (quickreply.settings.allowBBCode) {
					insert_text('[quote=' + username + ' post_id=' + self._postID + ' time=' + postTime + ' user_id=' + userID + ']' + self._selection + '[/quote]\r');
				} else {
					insert_text(username + ' ' + quickreply.language.WROTE + ':' + '\n'); 
and replace with

Code: Select all

				if (quickreply.settings.allowBBCode) {
					insert_text('[quote="' + username + '" post_id=' + self._postID + ' time=' + postTime + ' user_id=' + userID + ']' + self._selection + '[/quote]\r');
				} else {
					insert_text('"' + username + '" ' + quickreply.language.WROTE + ':' + '\n');
(not sure about the last line, btw...)
Last edited by BioLogIn on Tue Nov 07, 2017 2:16 pm
BioLogIn
Registered User
Posts: 172
Joined: Sun Jan 06, 2008 10:51 am
Contact:

Re: A bug report - users with [ ] in username break quick qu

by JoshyPHP » Tue Nov 07, 2017 12:19 pm

There's a JavaScript function generateQuote() that's designed for that purpose.
I wrote the thing that does BBCodes in 3.2.
User avatar
JoshyPHP
Code Contributor
Posts: 1012
Joined: Mon Jul 11, 2011 12:28 am
Contact:

Re: A bug report - users with [ ] in username break quick qu

by Татьяна5 » Tue Nov 07, 2017 3:38 pm

Fixed
Thanks
User avatar
Татьяна5
Registered User
Posts: 136
Joined: Wed Feb 13, 2013 5:30 pm
Name: Tatiana
Contact: