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.
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
@eviltrout если это не невероятно сложно и/или болезненно исправить, я не против, если кто-то возьмётся за это. Однако, если это действительно очень сложно, то лучше отбросить.
По-моему, в последний раз, когда я разбирался с подобной проблемой (сопоставление вложенных тегов в JavaScript в excerpt-ах), я застрял на необходимости использовать регулярные выражения с просмотром назад. Хотя, с другой стороны, меня бы не удивило, если бы кто-то, кто лучше разбирается в регулярках, чем я, смог бы найти приемлемое решение.
Это было реализовано и теперь работает как ожидалось. Цитирование цитаты сохранит информацию об оригинальном сообщении. Попробуйте это на одной из цитат выше.