Page MenuHomePhabricator

Trim question before posting on-wiki
Closed, ResolvedPublic

Description

If your question contains a newline at its end, it will cause the signature to be malformed, see https://test.wikipedia.org/w/index.php?title=User_talk:Roan_Kattouw_(WMF)&diff=398947&oldid=398820. Since I don't see a reason for allowing newlines (or any other whitespace chars) at the start or end of a question (such whitespace will probably be an user's mistake rather than intention), I think we should trim question before doing all of QuestionPoster logic.

This affects mentorship questions, helpdesk question from Homepage and help pane questions.

Real on-wiki example: https://cs.wikipedia.org/w/index.php?title=Diskuse_s_wikipedistkou:Czeva&diff=17475258&oldid=17473215

Details

Related Gerrit Patches:
mediawiki/extensions/GrowthExperiments : masterTrim question in QuestionPoster's constructor

Event Timeline

Restricted Application added projects: Growth-Team, User-Urbanecm. · View Herald TranscriptJul 13 2019, 12:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 522593 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/extensions/GrowthExperiments@master] Trim question in QuestionPoster's constructor

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

Urbanecm triaged this task as Medium priority.Jul 14 2019, 12:33 PM

Change 522593 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Trim question in QuestionPoster's constructor

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

Etonkovidova closed this task as Resolved.Jul 30 2019, 8:20 PM