Page MenuHomePhabricator

Don't search for signatures in blockquote elements
Closed, ResolvedPublic

Description

ReplyTool currently adds its reply links to signatures appearing in blockquote elements.

image.png (165×630 px, 12 KB)

Among other things, this would impair the section identification in the planned topic notifications feature. As @matmarex has pointed out, the oldest comment in the section is planned to be used for section identification, and the quoted comment is quite likely to be the oldest in the section.

The other possible invalid signature container is the q element.

Convenient-Discussions also excludes elements with the classes defined in the wiki configuration, which is useful for process notes such as "This section has been moved from...", quotations that are for some reason not in blockquote tags (although it's better to make the quotation template in the wiki to use the semantically correct tag), and other cases. But that would require additional configuration.

Event Timeline

I agree that we should do this. The idea was raised before in T249293, but we haven't gotten around to implementing it.

@Jack_who_built_the_house and/or @matmarex:

Are you able to share, at a high level, how what is being described in this task relates to topic subscriptions (T263820)?

@ppelberg It's specifically related to the unique topic identifiers (T264885#6859503). If we use the time the topic was published as a part of the identifier, then adding a reply that quotes a comment from an older thread could change the thread's identifier (by using the time of that quoted comment, instead of the oldest "real" comment in the thread), thus breaking subscriptions that used the previous identifier.

Change 667270 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Don't detect comments within quotes

https://gerrit.wikimedia.org/r/667270

Do you think the "cite" element should also be included in the list? Currently it is used in the English Wikipedia quote templates such as Cquote, Quote box, the search returns a couple of results where it contains signatures. The Talk quote block template, on the other hand, doesn't contain the "cite" element.

The problem is, the "cite" element has changed its semantics several times, and, as far as I understand, the specification currently forbids its use to point to the author and other attributes of the quoted material, allowing only its title. (Not sure about that as the other recently published specification, HTML 5.3, contradicts that, please confirm.)

@ppelberg It's specifically related to the unique topic identifiers (T264885#6859503). If we use the time the topic was published as a part of the identifier, then adding a reply that quotes a comment from an older thread could change the thread's identifier (by using the time of that quoted comment, instead of the oldest "real" comment in the thread), thus breaking subscriptions that used the previous identifier.

Ah, I see. Thank you for mapping that connection, @matmarex.

Change 667270 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Don't detect comments within quotes

https://gerrit.wikimedia.org/r/667270

Do you think the "cite" element should also be included in the list? Currently it is used in the English Wikipedia quote templates such as Cquote, Quote box, the search returns a couple of results where it contains signatures. The Talk quote block template, on the other hand, doesn't contain the "cite" element.

The problem is, the "cite" element has changed its semantics several times, and, as far as I understand, the specification currently forbids its use to point to the author and other attributes of the quoted material, allowing only its title. (Not sure about that as the other recently published specification, HTML 5.3, contradicts that, please confirm.)

I'm not sure if that's a technically correct usage, but even if it isn't, I think it doesn't hurt to include that element in our list. I can't think of a situation where having a discussion comment inside <cite> would be correct. Thanks for pointing it out.

Change 667707 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Don't detect comments within 'cite' elements too

https://gerrit.wikimedia.org/r/667707

Change 667707 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Don't detect comments within 'cite' elements too

https://gerrit.wikimedia.org/r/667707