Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix problem where unescaped html entities could hide the rest of the …

…helper script

See
https://en.wikipedia.org/wiki/Wikipedia_talk:WikiProject_Articles_for_cr
eation/Helper_script#Wikipedia_talk:Articles_for_creation.2FIndubious
  • Loading branch information...
commit 1a173c9e129ae3f6f8c77085d95e7e6174f9a98a 1 parent d004b8c
@theopolisme theopolisme authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  src/submissions.js
View
1  src/submissions.js
@@ -1337,6 +1337,7 @@ function afcHelper_warnings(pagetext) {
errormsg += ('<h3><div class="afcHelper_notice">The page ' + afcHelper_escapeHtmlChars(afcHelper_submissionTitle) + ' was deleted ' + deletionlog.length + ' time' + ((deletionlog.length != 1) ? "s" : "") + '. Here ' + ((deletionlog.length != 1) ? "are" : "is") + ' the edit summar' + ((deletionlog.length != 1) ? "ies" : "y") + ' from the <a href="' + wgScript + '?title=Special%3ALog&type=delete&page=' + afcHelper_submissionTitle + '" target="_blank">deletion log</a>:</div></h3><table class="wikitable"><tr><td><b>Timestamp</b></td><td><b>User</b></td><td><b>Reason</b></td></tr>');
for (var i = 0; i < deletionlog.length; i++) {
var deletioncomment = deletionlog[i].comment;
+ deletioncomment = $('<div/>').text(deletioncomment).html(); //properly escape html entities
var deletioncomment1_re = /\[\[([^\[\]]*?[^\]\|]*?)(\|([^\[\]]*?))\]\]/gi;
var deletioncomment2_re = /\[\[((?:\[\[[^\[\]]*\]\]|[^\]\[[])*)\]\]/gi;
//first handle wikilinks with piped links
Please sign in to comment.
Something went wrong with that request. Please try again.