r86479 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86478‎ | r86479 | r86480 >
Date:15:05, 20 April 2011
Author:catrope
Status:ok
Tags:
Comment:
CodeReview: Escape author and status for HTML in tooltips
Modified paths:
  • /trunk/extensions/CodeReview/modules/ext.codereview.tooltips.js (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/modules/ext.codereview.tooltips.js
@@ -40,11 +40,13 @@
4141 var text = rev['*'].length > 82 ? rev['*'].substr(0,80) + '...' : rev['*'];
4242 text = mw.html.escape( text );
4343 text = text.replace( /\n/g, '<br/>' );
 44+ var status = mw.html.escape( rev.status );
 45+ var author = mw.html.escape( rev.author );
4446
45 - var tip = '<div class="mw-codereview-status-' + rev.status + '" style="padding:5px 8px 4px; margin:-5px -8px -4px;">'
 47+ var tip = '<div class="mw-codereview-status-' + status + '" style="padding:5px 8px 4px; margin:-5px -8px -4px;">'
4648 + 'r' + matches[2]
47 - + ' [' + rev.status + '] by '
48 - + rev.author
 49+ + ' [' + status + '] by '
 50+ + author
4951 + ( rev['*'] ? ' - ' + text : '' )
5052 + '</div>';
5153 $el.attr( 'title', tip );

Follow-up revisions

RevisionCommit summaryAuthorDate
r87090MFT a few minor CR fixes (r86477, r86478, r86479, r87012)demon18:11, 28 April 2011

Status & tagging log