Merge "Don't armor french spaces before punctuation followed by word characters"
[lhc/web/wiklou.git] / includes / content / TextContent.php
index 71f65b3..c058296 100644 (file)
@@ -75,7 +75,7 @@ class TextContent extends AbstractContent {
 
                $text = $this->getNativeData();
 
-               $truncatedtext = $wgContLang->truncate(
+               $truncatedtext = $wgContLang->truncateForDatabase(
                        preg_replace( "/[\n\r]/", ' ', $text ),
                        max( 0, $maxlength ) );
 
@@ -194,7 +194,7 @@ class TextContent extends AbstractContent {
         * @since 1.21
         *
         * @param Content $that The other content object to compare this content object to.
-        * @param Language $lang The language object to use for text segmentation.
+        * @param Language|null $lang The language object to use for text segmentation.
         *    If not given, $wgContentLang is used.
         *
         * @return Diff A diff representing the changes that would have to be