Page MenuHomePhabricator

Edit preview shouldn't remove spaces from summary
Closed, ResolvedPublic

Description

Author: timwi

Description:
When you edit a section, the edit summary field is prefilled with this text:

/* Section title */

with a space at the end (!). This is so that you can easily add something after
the "*/".

When you preview, however, that space disappears, probably because the edit
summary is whitespace-trimmed. Maybe this should not be done until the edit is
actually saved.


Version: unspecified
Severity: minor
Platform: PC

Details

Reference
bz2053

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 8:29 PM
bzimport set Reference to bz2053.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

Confirmed in REL1_4 and HEAD, the problem is this line:

$this->summary = trim( $request->getText( 'wpSummary' ) );

Which gets called on edit, preview and save, we might want to change it not to
be called on edit or to be only called on save.

Fixed in CVS HEAD for 1.5.

Moved the trim on the summary into the Revision initializer, so it's done on the save rather than in the UI.

Diffusion added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:25 AM