Making WordPress.org

Opened 7 years ago

Closed 7 years ago

#2492 closed defect (bug) (fixed)

Profiles: Show the first sentence of forum reply on Activity tab, not the last one

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Profiles Keywords: has-patch commit
Cc:

Description

Follow-up to #2222.

If a reply contains multiple quotes and multiple sentences, the activity entry displays the last sentence instead of the first one. That's because WPOrg_WP_Activity_Notifier::trim_text() uses a "greedy" selector.

See an example. My activity entry for that reply:

Posted a reply to Снова об XML-RPC, on the site Форумы поддержки:
Оставляю.

Correct entry would have been:

Posted a reply to Снова об XML-RPC, on the site Форумы поддержки:
Поменял на более нейтральный.

Attachments (1)

meta-2492.patch (929 bytes) - added by SergeyBiryukov 7 years ago.

Download all attachments as: .zip

Change History (2)

#1 @coffee2code
7 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 5116:

Profiles Activity Notifier: When trimming blockquotes, don't overzelously include original content between two separate blockquotes.

Props SergeyBiryukov.
Fixes #2492.

Note: See TracTickets for help on using tickets.