wfProfileOut( get_class( $this ) . "::importContentFormData" );
}
+ # Trim spaces on user supplied text
+ $summary = trim( $request->getText( 'wpSummary' ) );
+
# Truncate for whole multibyte characters
- $this->summary = $wgContLang->truncate( $request->getText( 'wpSummary' ), 255 );
+ $this->summary = $wgContLang->truncate( $summary, 255 );
# If the summary consists of a heading, e.g. '==Foobar==', extract the title from the
# header syntax, e.g. 'Foobar'. This is mainly an issue when we are using wpSummary for
unset( $this->mAttribs['rc_ip'] );
}
+ # Trim spaces on user supplied text
+ $this->mAttribs['rc_comment'] = trim( $this->mAttribs['rc_comment'] );
+
# Make sure summary is truncated (whole multibyte characters)
$this->mAttribs['rc_comment'] = $wgContLang->truncate( $this->mAttribs['rc_comment'], 255 );
$summary = wfMsgReplaceArgs( $summary, $args );
}
+ // Trim spaces on user supplied text
+ $summary = trim( $summary );
+
// Truncate for whole multibyte characters.
$summary = $wgContLang->truncate( $summary, 255 );
$options['headers'] = array();
}
+ // Trim spaces on user supplied text
+ $comment = trim( $comment );
+
// truncate nicely or the DB will do it for us
// non-nicely (dangling multi-byte chars, non-truncated version in cache).
$comment = $wgContLang->truncate( $comment, 255 );
$this->timestamp = wfTimestampNow();
}
+ # Trim spaces on user supplied text
+ $comment = trim( $this->getComment() );
+
# Truncate for whole multibyte characters.
- $comment = $wgContLang->truncate( $this->getComment(), 255 );
+ $comment = $wgContLang->truncate( $comment, 255 );
$data = array(
'log_id' => $id,
$comment = '';
}
+ # Trim spaces on user supplied text
+ $comment = trim( $comment );
+
# Truncate for whole multibyte characters.
$comment = $wgContLang->truncate( $comment, 255 );