Page MenuHomePhabricator

Blocks log entries display as malformed on Special:CheckUser
Closed, ResolvedPublic2 Estimated Story Points

Description

When viewing the 'Get edits' for an IP address that includes a user or IP that has been partially blocked, the block expiration of the log entry appears malformed:

TBolliger (WMF) blocked Oct-31-test-2 from editing Cow with an expiration time of <span class="blockExpiry" title="‎1 year">1 year</span> (autoblock disabled)

Screen Shot 2018-11-01 at 9.55.28 AM.png (1,464×928 px, 309 KB)


Expected behavior

  • The block log entries should not show rogue HTML span tags

Event Timeline

This also affects sitewide blocks in the same way.

It's due to HTML escaping in SpecialCheckUser::CUChangesLine():

$line .= ' ' . Linker::formatComment( $row->cuc_actiontext ) . ' ';

Change 481204 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/core@master] Make Linker::formatAutocomments public

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

Change 481205 had a related patch set uploaded (by Dmaza; owner: Dmaza):
[mediawiki/extensions/CheckUser@master] Fix raw html output on logs

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

• dmaza renamed this task from Partial blocks log entries display as malformed on Special:CheckUser to Blocks log entries display as malformed on Special:CheckUser.Dec 21 2018, 8:59 PM

Change 482606 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/core@master] Extract summary (comment) formatting from Linker to SummaryFormatter

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

Change 483169 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/core@master] Fix malformed output of block logs

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

Change 481205 abandoned by Tchanders:
Fix raw html output on logs

Reason:
Following Catrope's advice here: Id3fcdf

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

Change 483169 merged by jenkins-bot:
[mediawiki/core@master] Fix malformed output of block logs

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

Change 481204 abandoned by Mooeypoo:
Make Linker::formatAutocomments public

Reason:
No longer necessary due to Id3fcdf

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

dbarratt reassigned this task from • dmaza to Tchanders.
dbarratt moved this task from Review to Done on the Anti-Harassment-Team (Alef — א) board.
dbarratt added a subscriber: • dmaza.

Change 482606 abandoned by Thiemo Kreuz (WMDE):
[mediawiki/core@master] Extract comment (summary) formatting from Linker to CommentFormatter

Reason:
Not worth my time doing politics for smaller code quality improvements like this while everybody is busy deprecating everything the same time just to prove a point.

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