Page MenuHomePhabricator

Page.touch() removes whitespace at the end of a page
Closed, InvalidPublic

Description

As shown with this diff on enwiki the .touch() method removes whitespace at the end of the page.

It should be possible to prevent edits that can modify the content, since many users expect touch() to be quiet in recent changes, edit history, etc.

Event Timeline

Xqt triaged this task as Medium priority.Jan 28 2019, 12:17 AM

The spaces at the end of the page should never exist and if they do exist, this is a correct behavior. This is not produced by Pywikibot, but by MediaWiki API itself, we can do nothing about it.

abian subscribed.

The spaces at the end of the page should never exist and if they do exist, this is a correct behavior. This is not produced by Pywikibot, but by MediaWiki API itself, we can do nothing about it.

I've changed the description accordingly.

The spaces at the end of the page should never exist and if they do exist, this is a correct behavior. This is not produced by Pywikibot, but by MediaWiki API itself, we can do nothing about it.

I've changed the description accordingly.

But that would prevent to touch the page containing whitespace at the end at all. There is no other way to touch the page without removing the whitespace. You can use -botflag to avoid flooding RC

But that would prevent to touch the page containing whitespace at the end at all. There is no other way to touch the page without removing the whitespace. You can use -botflag to avoid flooding RC

Yeah, that's the price the operator would pay, but probably they want to touch a lot of pages and the rest would be touched.

Or you can avoid touching those pages using -grep:"\S$" parameter

Dvorapa lowered the priority of this task from Medium to Lowest.Jan 30 2019, 7:54 PM
Dvorapa changed the task status from Resolved to Invalid.Jan 30 2019, 8:07 PM

(no code change was done in here)