[MediaWiki-commits] [Gerrit] Prevent app from inserting HTML tags into edit summaries - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: Prevent app from inserting HTML tags into edit summaries .. Prevent app from inserting HTML tags into edit summaries Presently, in some circumstances, the app can insert HTML tags into edit summaries, which doesn't make much sense since edit summaries are plaintext. This patch prevents that from occurring by stripping any HTML in the edit summary at the last minute. Bug: T122714 Change-Id: I339794acdd9cc28650058283aa3789e43429074b --- M app/src/main/java/org/wikipedia/editing/EditSectionActivity.java 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Mholloway: Looks good to me, approved jenkins-bot: Verified diff --git a/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java b/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java index 24c0a4f..e94bbac 100644 --- a/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java +++ b/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java @@ -255,6 +255,8 @@ String summaryText = TextUtils.isEmpty(sectionHeading) ? "" : ("/* " + sectionHeading + " */ "); summaryText += editPreviewFragment.getSummary(); +// Summaries are plaintext, so remove any HTML that's made its way into the summary +summaryText = Html.fromHtml(summaryText).toString(); new EditTask(EditSectionActivity.this, title, sectionText.getText().toString(), sectionID, token, summaryText, app.getUserInfoStorage().isLoggedIn()) { -- To view, visit https://gerrit.wikimedia.org/r/261798 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I339794acdd9cc28650058283aa3789e43429074b Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Deskana Gerrit-Reviewer: BearND Gerrit-Reviewer: Brion VIBBER Gerrit-Reviewer: Dbrant Gerrit-Reviewer: Deskana Gerrit-Reviewer: Mholloway Gerrit-Reviewer: Niedzielski Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Prevent app from inserting HTML tags into edit summaries - change (apps...wikipedia)
Deskana has uploaded a new change for review. https://gerrit.wikimedia.org/r/261798 Change subject: Prevent app from inserting HTML tags into edit summaries .. Prevent app from inserting HTML tags into edit summaries Presently, in some circumstances, the app can insert HTML tags into edit summaries, which doesn't make much sense since edit summaries are plaintext. This patch prevents that from occurring by stripping any HTML in the edit summary at the last minute. Bug: T122714 Change-Id: I339794acdd9cc28650058283aa3789e43429074b --- M app/src/main/java/org/wikipedia/editing/EditSectionActivity.java 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia refs/changes/98/261798/1 diff --git a/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java b/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java index 24c0a4f..e94bbac 100644 --- a/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java +++ b/app/src/main/java/org/wikipedia/editing/EditSectionActivity.java @@ -255,6 +255,8 @@ String summaryText = TextUtils.isEmpty(sectionHeading) ? "" : ("/* " + sectionHeading + " */ "); summaryText += editPreviewFragment.getSummary(); +// Summaries are plaintext, so remove any HTML that's made its way into the summary +summaryText = Html.fromHtml(summaryText).toString(); new EditTask(EditSectionActivity.this, title, sectionText.getText().toString(), sectionID, token, summaryText, app.getUserInfoStorage().isLoggedIn()) { -- To view, visit https://gerrit.wikimedia.org/r/261798 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I339794acdd9cc28650058283aa3789e43429074b Gerrit-PatchSet: 1 Gerrit-Project: apps/android/wikipedia Gerrit-Branch: master Gerrit-Owner: Deskana ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits