Changeset 1867 for MediaWiki/trunk/mw12/FCKeditorParser_OldPP.body.php
- Timestamp:
- 2008-04-01 16:57:12 (6 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
MediaWiki/trunk/mw12/FCKeditorParser_OldPP.body.php
r1865 r1867 45 45 * @return string 46 46 */ 47 private function fck_addToStrtr($text ) {47 private function fck_addToStrtr($text, $replaceLineBreaks = true) { 48 48 $key = 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw'; 49 49 $this->fck_mw_strtr_span_counter++; 50 $this->fck_mw_strtr_span[$key] = str_replace(array("\r\n", "\n", "\r"),"fckLR",$text); 50 if ($replaceLineBreaks) { 51 $this->fck_mw_strtr_span[$key] = str_replace(array("\r\n", "\n", "\r"),"fckLR",$text); 52 } 53 else { 54 $this->fck_mw_strtr_span[$key] = $text; 55 } 51 56 return $key; 52 57 } … … 288 293 # Remove the comment, leading and trailing 289 294 # spaces, and leave only one newline. 290 $replacement = $this->fck_addToStrtr(substr($text, $spaceStart, $spaceLen+1) );295 $replacement = $this->fck_addToStrtr(substr($text, $spaceStart, $spaceLen+1), false); 291 296 $text = substr_replace($text, $replacement."\n", $spaceStart, $spaceLen + 1); 292 297 } 293 298 else { 294 299 # Remove just the comment. 295 $replacement = $this->fck_addToStrtr(substr($text, $start, $end - $start) );300 $replacement = $this->fck_addToStrtr(substr($text, $start, $end - $start), false); 296 301 $text = substr_replace($text, $replacement, $start, $end - $start); 297 302 }