Parsing partial quotes from nested quotes?

Had the following situation pop up today:

User A:

And yes… It’s been dark times lately… Cursing is just what helps release the stress

User B:

Post from User A:
And yes… It’s been dark times lately… Cursing is just what helps release the stress

Also, he doesn’t discriminate to one form of communication… Just check his Tweets… He can also write it as he speaks it…

User C (Quotes User A, but via User B’s post):

Post from User B
And yes… It’s been dark times lately… Cursing is just what helps release the stress

So much hatred. Have you thought about going and talking to someone?

User B:

Hey User C! Somehow it looks like I wrote that!

User C:

Post from User B:
Hey User C! Somehow it looks like I wrote that!

I am so lost User B, who did what?

User C wasn’t malicious… They are just a less sophisticated user.

Suggestion here that when a quote only refers to a nested quote, the quoting used should refer to the original quote rather than the nested quote.

1 Like

This is going to be hard to do, considering we can do this :arrow_down:

Why not teach your users to quote the original post instead of a quote insite another post? They can also quote from multiple posts if they want.

Interesting… I had always assumed the quote was actually validated… Didn’t realize that I could just have a pretend quote free for all…

Makes for a good litmus test… If someone purposely abuses quotes in that way, you know who to ban :wink:

Since the quotes aren’t validated, I see your point…

Thanks for considering :handshake:

1 Like

We do validate the quotes (kinda), and attach a .quote-modified class to any which have been amended. Let’s see if it figures out the nested quotes:

Hmmm, no it doesn’t. I guess ‘technically’ that content is still part of @ryanerwin’s post. Quite tricky to resolve though. As @zogstrip already said the best way is to try and get your users to quote the original post.

3 Likes

They do quote correctly most of the time. For casual users, nested quotes can be pretty complicated… The “Quote whole post” button is very rarely used for us.

It’s just the real example that came up today, where an innocent but not extremely sophisticated user was just trying to make a quote, and the quote appeared as though it was from a different user…

That’s why I posted it here.

Mods can of course manually edit the post to fix it. And this can’t come up too terribly often. Just a thought to avoid an awkward situation that comes up occasionally :wink:

image

Here’s the actual post (names removed).
You can see how that being attributed to the opposite party in a debate comes across as pretty strange.

NOTE: feel free to delete the image in this post if it’s over the line for meta TOS… Just thought it best to provide a real example.

1 Like

@eviltrout if it isn’t incredibly complex and/or painful to fix, I wouldn’t mind if someone could take this one… however if it is very complex, then ditch it.

2 Likes

IIRC, the last time I looked into a similar problem (JavaScript matching nested tags in excerpts) I got stuck at needing look-behind regex. Then again, I wouldn’t be surprised if someone better at regex than I could figure out an acceptable solution.

1 Like

You don’t need nesting, just look for the nearest quote header block moving upward.

1 Like

@nbianca looked at something similar recently, so I think she might be a good candidate for this one.

3 Likes

This has been implemented and works as expected now. Quoting a quote will preserve the original post information. Try it out with one of the quotes above. :blush:

https://github.com/discourse/discourse/commit/7b7e1717f2c1579ae7de9d344a7e7cbc63f8fffc

7 Likes

:tada: seems to work, as I grabbed this from here:

3 Likes

This topic was automatically closed after 4 days. New replies are no longer allowed.