Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -543,8 +543,8 @@ |
544 | 544 | # Truncate for whole multibyte characters. +5 bytes for ellipsis |
545 | 545 | $this->summary = $wgLang->truncate( $request->getText( 'wpSummary' ), 250 ); |
546 | 546 | |
547 | | - # Remove extra headings and whitespace from summaries and new sections. |
548 | | - $this->summary = trim(preg_replace('/^=+(.*?)=+$/', '$1', trim($this->summary))); |
| 547 | + # Remove extra headings from summaries and new sections. |
| 548 | + $this->summary = preg_replace('/^(\s*)=+(.*?)=+(\s*)$/', '$1$2$3', $this->summary); |
549 | 549 | |
550 | 550 | $this->edittime = $request->getVal( 'wpEdittime' ); |
551 | 551 | $this->starttime = $request->getVal( 'wpStarttime' ); |