Mattflaschen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/243066

Change subject: WIP: Add support for edit summary formatting in topic titles
......................................................................

WIP: Add support for edit summary formatting in topic titles

This adds support for basic links in topic titles using the edit summary
parser.  To do so, it stops using the 'plaintext' format for topic
titles, and adds topic-title-wikitext' and 'topic-title-html'.  There
is also logic to Do What I Mean in limited cases.  For example, if you
request a topic list in 'html', it will understand that the topic
titles should be 'topic-title-html'.

* Rename Flow\Parsoid\Utils since it handles more than Parsoid (even
  before it did in some cases).

* Rename PostRevision::create to PostRevision::createTopicPost to make
  clear it's specifically for the root post of a topic.

Bug: T59153
Change-Id: I8d6bd8090de242c2b1761003cce04d590d7f9ae6
---
M Hooks.php
M autoload.php
M i18n/en.json
M includes/Api/ApiParsoidUtilsFlow.php
M includes/Block/Topic.php
M includes/Block/TopicList.php
R includes/Conversion/Utils.php
M includes/Data/Listener/ReferenceRecorder.php
M includes/Formatter/CategoryViewerFormatter.php
M includes/Formatter/ChangesListFormatter.php
M includes/Formatter/ContributionsFormatter.php
M includes/Formatter/RevisionFormatter.php
M includes/Formatter/TocTopicListFormatter.php
M includes/Import/Importer.php
M includes/Import/OptInController.php
M includes/Import/TemplateHelper.php
M includes/Import/Wikitext/ImportSource.php
M includes/Log/ActionFormatter.php
M includes/Model/AbstractRevision.php
M includes/Model/PostRevision.php
M includes/Notifications/Controller.php
M includes/Notifications/Formatter.php
M includes/OOUI/BoardDescriptionWidget.php
M includes/Parsoid/ContentFixer.php
M includes/Parsoid/Fixer/BadImageRemover.php
M includes/Parsoid/Fixer/WikiLinkFixer.php
M includes/Parsoid/ReferenceExtractor.php
M includes/Parsoid/ReferenceFactory.php
M includes/Search/HeaderUpdater.php
M includes/Search/TopicUpdater.php
M includes/TemplateHelper.php
M includes/Templating.php
M includes/View.php
M maintenance/convertToText.php
M maintenance/repair_missing_revision_content.php
M modules/flow/dm/mw.flow.dm.RevisionedContent.js
R tests/phpunit/Conversion/UtilsTest.php
M tests/phpunit/Data/Listener/RecentChangesListenerTest.php
M tests/phpunit/Formatter/RevisionFormatterTest.php
M tests/phpunit/HookTest.php
M tests/phpunit/Import/PageImportStateTest.php
M tests/phpunit/Import/Wikitext/ImportSourceTest.php
M tests/phpunit/LinksTableTest.php
M tests/phpunit/Model/PostRevisionTest.php
M tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php
M tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php
M tests/phpunit/Parsoid/ReferenceExtractorTest.php
M tests/phpunit/SpamFilter/ConfirmEditTest.php
M tests/phpunit/SpamFilter/ContentLengthFilterTest.php
M tests/phpunit/TemplatingTest.php
M tests/phpunit/api/ApiFlowEditTitleTest.php
M tests/phpunit/api/ApiFlowViewTopicListTest.php
M tests/qunit/flow/dm/test_mw.flow.dm.Board.js
M tests/qunit/flow/dm/test_mw.flow.dm.Post.js
M tests/qunit/flow/dm/test_mw.flow.dm.System.js
M tests/qunit/flow/dm/test_mw.flow.dm.Topic.js
56 files changed, 505 insertions(+), 155 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/66/243066/1

diff --git a/Hooks.php b/Hooks.php
index 6d14dd5..3dd95eb 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -97,7 +97,7 @@
                        self::getAbuseFilter();
                }
 
-               if ( $wgFlowContentFormat === 'html' && 
!Flow\Parsoid\Utils::isParsoidConfigured() ) {
+               if ( $wgFlowContentFormat === 'html' && 
!Flow\Conversion\Utils::isParsoidConfigured() ) {
                        wfDebugLog( 'Flow', __METHOD__ . ': Warning: 
$wgFlowContentFormat was set to \'html\', but you do not have Parsoid enabled.  
Changing $wgFlowContentFormat to \'wikitext\'' );
                        $wgFlowContentFormat = 'wikitext';
                }
diff --git a/autoload.php b/autoload.php
index 5a826c6..eb577d1 100644
--- a/autoload.php
+++ b/autoload.php
@@ -54,6 +54,7 @@
        'Flow\\Container' => __DIR__ . '/includes/Container.php',
        'Flow\\Content\\BoardContent' => __DIR__ . 
'/includes/Content/BoardContent.php',
        'Flow\\Content\\BoardContentHandler' => __DIR__ . 
'/includes/Content/BoardContentHandler.php',
+       'Flow\\Conversion\\Utils' => __DIR__ . '/includes/Conversion/Utils.php',
        'Flow\\Data\\BagOStuff\\BufferedBagOStuff' => __DIR__ . 
'/includes/Data/BagOStuff/BufferedBagOStuff.php',
        'Flow\\Data\\BagOStuff\\LocalBufferedBagOStuff' => __DIR__ . 
'/includes/Data/BagOStuff/LocalBufferedBagOStuff.php',
        'Flow\\Data\\BufferedCache' => __DIR__ . 
'/includes/Data/BufferedCache.php',
@@ -260,7 +261,6 @@
        'Flow\\Parsoid\\Fixer\\WikiLinkFixer' => __DIR__ . 
'/includes/Parsoid/Fixer/WikiLinkFixer.php',
        'Flow\\Parsoid\\ReferenceExtractor' => __DIR__ . 
'/includes/Parsoid/ReferenceExtractor.php',
        'Flow\\Parsoid\\ReferenceFactory' => __DIR__ . 
'/includes/Parsoid/ReferenceFactory.php',
-       'Flow\\Parsoid\\Utils' => __DIR__ . '/includes/Parsoid/Utils.php',
        'Flow\\RecoverableErrorHandler' => __DIR__ . 
'/includes/RecoverableErrorHandler.php',
        'Flow\\ReferenceClarifier' => __DIR__ . 
'/includes/ReferenceClarifier.php',
        'Flow\\Repository\\MultiGetList' => __DIR__ . 
'/includes/Repository/MultiGetList.php',
@@ -311,6 +311,7 @@
        'Flow\\Tests\\Collection\\PostCollectionTest' => __DIR__ . 
'/tests/phpunit/Collection/PostCollectionTest.php',
        'Flow\\Tests\\Collection\\RevisionCollectionPermissionsTest' => __DIR__ 
. '/tests/phpunit/Collection/RevisionCollectionPermissionsTest.php',
        'Flow\\Tests\\ContainerTest' => __DIR__ . 
'/tests/phpunit/ContainerTest.php',
+       'Flow\\Tests\\Conversion\\ConversionUtilsTest' => __DIR__ . 
'/tests/phpunit/Conversion/UtilsTest.php',
        'Flow\\Tests\\Data\\CachingObjectManagerTest' => __DIR__ . 
'/tests/phpunit/Data/CachingObjectMapperTest.php',
        'Flow\\Tests\\Data\\FlowNothingTest' => __DIR__ . 
'/tests/phpunit/Data/NothingTest.php',
        'Flow\\Tests\\Data\\IndexTest' => __DIR__ . 
'/tests/phpunit/Data/IndexTest.php',
@@ -355,7 +356,6 @@
        'Flow\\Tests\\Parsoid\\BaseHrefFixerTest' => __DIR__ . 
'/tests/phpunit/Parsoid/Fixer/BaseHrefFixerTest.php',
        'Flow\\Tests\\Parsoid\\Fixer\\MethodReturnsConstraint' => __DIR__ . 
'/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php',
        'Flow\\Tests\\Parsoid\\Fixer\\WikiLinkFixerTest' => __DIR__ . 
'/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php',
-       'Flow\\Tests\\Parsoid\\ParsoidUtilsTest' => __DIR__ . 
'/tests/phpunit/Parsoid/UtilsTest.php',
        'Flow\\Tests\\Parsoid\\ReferenceExtractorTestCase' => __DIR__ . 
'/tests/phpunit/Parsoid/ReferenceExtractorTest.php',
        'Flow\\Tests\\Parsoid\\ReferenceFactoryTest' => __DIR__ . 
'/tests/phpunit/Parsoid/ReferenceFactoryTest.php',
        'Flow\\Tests\\PermissionsTest' => __DIR__ . 
'/tests/phpunit/PermissionsTest.php',
diff --git a/i18n/en.json b/i18n/en.json
index 14ed8b9..9cd2321 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -442,7 +442,7 @@
        "apihelp-flow+edit-post-example-1": "Edit a post in 
[[Topic:S2tycnas4hcucw8w]]",
        "apihelp-flow+edit-title-description": "Edits a topic's title.",
        "apihelp-flow+edit-title-param-prev_revision": "Revision ID of the 
current title revision, to check for edit conflicts.",
-       "apihelp-flow+edit-title-param-content": "Content for title.",
+       "apihelp-flow+edit-title-param-content": "Content for title, in the 
same format allowed for edit summaries (topic-title-wikitext).",
        "apihelp-flow+edit-title-example-1": "Edit the title of 
[[Topic:S2tycnas4hcucw8w]]",
        "apihelp-flow+edit-topic-summary-description": "Edits a topic summary's 
content.",
        "apihelp-flow+edit-topic-summary-param-prev_revision": "Revision ID of 
the current topic summary revision, if any, to check for edit conflicts.",
diff --git a/includes/Api/ApiParsoidUtilsFlow.php 
b/includes/Api/ApiParsoidUtilsFlow.php
index 66f5575..503f9bd 100644
--- a/includes/Api/ApiParsoidUtilsFlow.php
+++ b/includes/Api/ApiParsoidUtilsFlow.php
@@ -3,7 +3,7 @@
 namespace Flow\Api;
 
 use ApiBase;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Flow\Exception\WikitextException;
 
 class ApiParsoidUtilsFlow extends ApiBase {
diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php
index 18f7812..199d76f 100644
--- a/includes/Block/Topic.php
+++ b/includes/Block/Topic.php
@@ -703,7 +703,7 @@
        }
 
        /**
-        * @param string $format Content format 
(html|wikitext|html-fixed|plaintext)
+        * @param string $format Content format 
(html|wikitext|fixed-html|topic-title-html|topic-title-wikitext)
         * @return RevisionFormatter
         */
        protected function getRevisionFormatter( $format ) {
diff --git a/includes/Block/TopicList.php b/includes/Block/TopicList.php
index ffdcd70..569f07d 100644
--- a/includes/Block/TopicList.php
+++ b/includes/Block/TopicList.php
@@ -122,12 +122,10 @@
                $user = $this->context->getUser();
                $topicWorkflow = Workflow::create( 'topic', $title );
                $topicListEntry = TopicListEntry::create( $this->workflow, 
$topicWorkflow );
-               $topicTitle = PostRevision::create(
+               $topicTitle = PostRevision::createTopicPost(
                        $topicWorkflow,
                        $user,
-                       $this->submitted['topic'],
-                       // topic title is never parsed
-                       'wikitext'
+                       $this->submitted['topic']
                );
 
                $firstPost = null;
diff --git a/includes/Parsoid/Utils.php b/includes/Conversion/Utils.php
similarity index 88%
rename from includes/Parsoid/Utils.php
rename to includes/Conversion/Utils.php
index 182cf4e..851b339 100644
--- a/includes/Parsoid/Utils.php
+++ b/includes/Conversion/Utils.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Flow\Parsoid;
+namespace Flow\Conversion;
 
 use DOMDocument;
 use DOMNode;
@@ -11,6 +11,7 @@
 use Flow\Exception\NoParsoidException;
 use Flow\Exception\WikitextException;
 use Language;
+use Linker;
 use MultiHttpClient;
 use OutputPage;
 use RequestContext;
@@ -20,10 +21,12 @@
 
 abstract class Utils {
        /**
-        * Convert from/to wikitext/html.
+        * Convert from/to wikitext <=> html or topic-title-wikitext => 
topic-title-html.
+        * Only these pairs are supported.  html => wikitext requires Parsoid, 
and
+        * topic-title-html => topic-title-wikitext is not supported.
         *
-        * @param string $from Format of content to convert: html|wikitext
-        * @param string $to Format to convert to: html|wikitext
+        * @param string $from Format of content to convert: 
html|wikitext|topic-title-wikitext
+        * @param string $to Format to convert to: 
html|wikitext|topic-title-html
         * @param string $content
         * @param Title $title
         * @return string
@@ -34,13 +37,20 @@
                        return $content;
                }
 
-               try {
-                       return self::parsoid( $from, $to, $content, $title );
-               } catch ( NoParsoidException $e ) {
-                       // If we have no parsoid config, fallback to the parser.
-                       return self::parser( $from, $to, $content, $title );
+               if ( $from === 'wikitext' || $from === 'html' ) {
+                       if ( $to === 'wikitext' || $to === 'html' ) {
+                               try {
+                                       return self::parsoid( $from, $to, 
$content, $title );
+                               } catch ( NoParsoidException $e ) {
+                                       // If we have no parsoid config, 
fallback to the parser.
+                                       return self::parser( $from, $to, 
$content, $title );
+                               }
+                       } else {
+                               throw new WikitextException( "Conversion from 
'$from' to '$to' was requested, but this is not supported." );
+                       }
+               } else {
+                       return self::commentParser( $from, $to, $content, 
$title );
                }
-
        }
 
        /**
@@ -126,6 +136,22 @@
        }
 
        /**
+        * Convert from/to topic-title-wikitext/topic-title-html using 
Linker::formatLinksInComment
+        *
+        * @param string $from Format of content to convert: 
topic-title-wikitext
+        * @param string $to Format of content to convert to: topic-title-html
+        * @param string $content Content to convert, in topic-title-wikitext 
format.
+        * @return string $content in HTML
+        */
+       protected static function commentParser( $from, $to, $content ) {
+               if ( $from !== 'topic-title-wikitext' || $to !== 
'topic-title-html' ) {
+                       throw new WikitextException( "Conversion from '$from' 
to '$to' was requested, but this is not supported." );
+               }
+
+               return Linker::formatLinksInComment( $content );
+       }
+
+       /**
         * Convert from/to wikitext/html using Parser.
         *
         * This only supports wikitext to HTML.
@@ -138,7 +164,7 @@
         * @throws WikitextException When the conversion is unsupported
         */
        protected static function parser( $from, $to, $content, Title $title ) {
-               if ( $from !== 'wikitext' && $to !== 'html' ) {
+               if ( $from !== 'wikitext' || $to !== 'html' ) {
                        throw new WikitextException( "Conversion from '$from' 
to '$to' was requested, but core's Parser only supports 'wikitext' to 'html' 
conversion", 'process-wikitext' );
                }
 
diff --git a/includes/Data/Listener/ReferenceRecorder.php 
b/includes/Data/Listener/ReferenceRecorder.php
index 99ceb05..b1e8408 100644
--- a/includes/Data/Listener/ReferenceRecorder.php
+++ b/includes/Data/Listener/ReferenceRecorder.php
@@ -118,10 +118,11 @@
        }
 
        /**
-        * While topic's themselves are plaintext and do not contain any 
references,
-        * moderation actions change what references are visible.  When 
transitioning
-        * from or to a generically visible state (unmoderated or locked) the 
entire
-        * topic + summary needs to be re-evaluated.
+        * Topic titles themselves only support minimal wikitext, and 
references are not tracked.
+        *
+        * However, moderation actions change what references are visible.  When
+        * transitioning from or to a generically visible state (unmoderated or 
locked) the
+        * entire topic + summary needs to be re-evaluated.
         *
         * @param Workflow $workflow
         * @param PostRevision $current Topic revision object that was inserted
diff --git a/includes/Formatter/CategoryViewerFormatter.php 
b/includes/Formatter/CategoryViewerFormatter.php
index 0c06022..dfaf880 100644
--- a/includes/Formatter/CategoryViewerFormatter.php
+++ b/includes/Formatter/CategoryViewerFormatter.php
@@ -28,7 +28,7 @@
 
                $topic = Linker::link(
                        $row->workflow->getArticleTitle(),
-                       htmlspecialchars( $row->revision->getContent( 
'plaintext' ) ),
+                       htmlspecialchars( $row->revision->getContent( 
'topic-title-wikitext' ) ),
                        array( 'class' => 'mw-title' )
                );
 
diff --git a/includes/Formatter/ChangesListFormatter.php 
b/includes/Formatter/ChangesListFormatter.php
index 4981cc5..0515d81 100644
--- a/includes/Formatter/ChangesListFormatter.php
+++ b/includes/Formatter/ChangesListFormatter.php
@@ -8,7 +8,7 @@
 use ChangesList;
 use Flow\Model\PostRevision;
 use Flow\Model\UUID;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use IContextSource;
 use Linker;
 
diff --git a/includes/Formatter/ContributionsFormatter.php 
b/includes/Formatter/ContributionsFormatter.php
index 51ec52b..4212b3e 100644
--- a/includes/Formatter/ContributionsFormatter.php
+++ b/includes/Formatter/ContributionsFormatter.php
@@ -5,7 +5,7 @@
 use Flow\Exception\FlowException;
 use Flow\Model\Anchor;
 use Flow\Model\PostRevision;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use ChangesList;
 use IContextSource;
 use Html;
diff --git a/includes/Formatter/RevisionFormatter.php 
b/includes/Formatter/RevisionFormatter.php
index e411992..0e39c76 100644
--- a/includes/Formatter/RevisionFormatter.php
+++ b/includes/Formatter/RevisionFormatter.php
@@ -11,7 +11,7 @@
 use Flow\Model\PostRevision;
 use Flow\Model\PostSummary;
 use Flow\Model\UUID;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Flow\RevisionActionPermissions;
 use Flow\Templating;
 use Flow\UrlGenerator;
@@ -66,9 +66,12 @@
        protected $includeContent = true;
 
        /**
-        * @var string[]
+        * @var string[] Allowed content formats
+        *
+        *  See setContentFormat.
         */
-       protected $allowedContentFormats = array( 'html', 'wikitext', 
'fixed-html', 'plaintext' );
+       protected $allowedContentFormats = array( 'html', 'wikitext', 
'fixed-html',
+               'topic-title-html', 'topic-title-wikitext' );
 
        /**
         * @var string Default content format for revision output
@@ -76,7 +79,7 @@
        protected $contentFormat = 'fixed-html';
 
        /**
-        * @var array Map from alphadeicmal revision id to content format 
ovverride
+        * @var array Map from alphadeicmal revision id to content format 
override
         */
        protected $revisionContentFormat = array();
 
@@ -145,6 +148,27 @@
                $this->includeContent = (bool)$shouldInclude;
        }
 
+       /**
+        * Sets the content format for all revisions formatted by this 
formatter, or a
+        * particular revision.
+        *
+        * @param string $format Format to use for revision content.  If no 
revision ID is
+        *  given, this is a default format, and the allowed formats are 
'html', 'wikitext',
+        *  and 'fixed-html'.
+        *
+        *  For the default format, 'fixed-html' will be converted to 
'topic-title-html'
+        *  when formatting a topic title.  'html' and 'wikitext' will be 
converted to
+        *  'topic-title-wikitext' for topic titles (because 'html' and 
'wikitext' are
+        *  editable, and 'topic-title-html' is not editable).
+        *
+        *  If a revision ID is given, the allowed formats are 'html', 
'wikitext',
+        *  'fixed-html', 'topic-title-html', and 'topic-title-wikitext'.  
However, the
+        *  format will not be converted, and must be valid for the given 
revision ('html',
+        *  'wikitext', and 'fixed-html' are valid only for non-topic titles.
+        *  'topic-title-html' and 'topic-title-wikitext' are only valid for 
topic titles.
+        *  Otherwise, an exception will be thrown later.
+        * @param UUID $revisionId Revision ID this format applies for.
+        */
        public function setContentFormat( $format, UUID $revisionId = null ) {
                if ( false === array_search( $format, 
$this->allowedContentFormats ) ) {
                        throw new FlowException( "Unknown content format: 
$format" );
@@ -246,7 +270,6 @@
                $res['isModeratedNotLocked'] = 
$moderatedRevision->isModerated() && !$moderatedRevision->isLocked();
 
                if ( $this->includeContent ) {
-                       // topic titles are always forced to plain text
                        $contentFormat = $this->decideContentFormat( 
$row->revision );
 
                        // @todo better name?
@@ -953,8 +976,10 @@
                                return '';
                        }
 
-                       $content = $this->templating->getContent( $root, 
'wikitext' );
+                       $content = $this->templating->getContent( $root, 
'topic-title-wikitext' );
 
+                       // This is *not* plaintext (it's topic-title-wikitext), 
but I think
+                       // this is required for i18n operations later.
                        return Message::plaintextParam( $content );
 
                case 'post-of-summary':
@@ -996,18 +1021,89 @@
        }
 
        /**
+        * Determines the exact output content format, given the requested 
content format
+        * and the revision type.
+        *
         * @param AbstractRevision $revision
-        * @return string
+        * @return string Content format
+        * @throws FlowException If a per-revision format was given and it is
+        *  invalid for the revision type (topic title/non-topic title).
         */
-       protected function decideContentFormat( AbstractRevision $revision ) {
-               if ( $revision instanceof PostRevision && 
$revision->isTopicTitle() ) {
-                       return 'plaintext';
-               }
+       public function decideContentFormat( AbstractRevision $revision ) {
+               $requestedRevFormat = null;
+               $requestedDefaultFormat = null;
+
                $alpha = $revision->getRevisionId()->getAlphadecimal();
                if ( isset( $this->revisionContentFormat[$alpha] ) ) {
-                       return $this->revisionContentFormat[$alpha];
+                       $requestedRevFormat = 
$this->revisionContentFormat[$alpha];
+               } else {
+                       $requestedDefaultFormat = $this->contentFormat;
                }
 
-               return $this->contentFormat;
+               if ( $revision instanceof PostRevision && 
$revision->isTopicTitle() ) {
+                       return $this->decideTopicTitleContentFormat( $revision, 
$requestedRevFormat, $requestedDefaultFormat );
+               } else {
+                       return $this->decideNonTopicTitleContentFormat( 
$revision, $requestedRevFormat, $requestedDefaultFormat );
+               }
+       }
+
+       /**
+        * Decide the content format for a topic title
+        *
+        * @param PostRevision $topicTitle Topic title revision
+        * @param string|null $requestedRevFormat Format requested for this 
specific revision
+        * @param string|null $requestedDefaultFormat Default format requested
+        * @return string
+        * @throws FlowException If a per-revision format was given and it is
+        *  invalid for topic titles.
+        */
+       protected function decideTopicTitleContentFormat( PostRevision 
$topicTitle, $requestedRevFormat, $requestedDefaultFormat ) {
+               if ( $requestedRevFormat !== null ) {
+                       if ( $requestedRevFormat !== 'topic-title-html' &&
+                               $requestedRevFormat !== 'topic-title-wikitext' 
) {
+
+                               throw new FlowException( 'Per-revision format 
for a topic title must be \'topic-title-html\' or \'topic-title-wikitext\'' );
+                       }
+                       return $requestedRevFormat;
+               } else {
+                       // Since this is a default format, we'll canonicalize 
it.
+
+                       // Because these are both editable formats, and this is 
the only
+                       // editable topic title format.
+                       if ( $requestedDefaultFormat === 'topic-title-wikitext' 
|| $requestedDefaultFormat === 'html' || $requestedDefaultFormat === 'wikitext' 
) {
+                               return 'topic-title-wikitext';
+                       } else {
+                               return 'topic-title-html';
+                       }
+               }
+       }
+
+       /**
+        * Decide the content format for revisions other than topic titles
+        *
+        * @param AbstractRevision $revision Revision to decide format for
+        * @param string|null $requestedRevFormat Format requested for this 
specific revision
+        * @param string|null $requestedDefaultFormat Default format requested
+        * @return string
+        * @throws FlowException If a per-revision format was given and it is
+        *  invalid for this type
+        */
+       protected function decideNonTopicTitleContentFormat( AbstractRevision 
$revision, $requestedRevFormat, $requestedDefaultFormat ) {
+               if ( $requestedRevFormat !== null ) {
+                       if ( $requestedRevFormat === 'topic-title-html' ||
+                               $requestedRevFormat === 'topic-title-wikitxt' ) 
{
+
+                               throw new FlowException( 'Invalid per-revision 
format.  Only topic titles can use  \'topic-title-html\' and 
\'topic-title-wikitext\'' );
+                       }
+                       return $requestedRevFormat;
+               } else {
+                       if ( $requestedDefaultFormat === 'topic-title-html' ||
+                               $requestedDefaultFormat === 
'topic-title-wikitxt' ) {
+
+                               throw new FlowException( 'Default format of 
\'topic-title-html\' or \'topic-title-wikitext\' can only be used to format 
topic titles.' );
+                       }
+
+                       return $requestedDefaultFormat;
+               }
        }
 }
diff --git a/includes/Formatter/TocTopicListFormatter.php 
b/includes/Formatter/TocTopicListFormatter.php
index f869764..ef98550 100644
--- a/includes/Formatter/TocTopicListFormatter.php
+++ b/includes/Formatter/TocTopicListFormatter.php
@@ -39,7 +39,7 @@
                        $revisionId = 
$postRevision->getRevisionId()->getAlphadecimal();
                        $result['posts'][$topicId] = array( $revisionId );
 
-                       $contentFormat = 'plaintext';
+                       $contentFormat = 'topic-title-wikitext';
 
                        $workflow = $workflowsByWorkflowId[$topicId];
 
diff --git a/includes/Import/Importer.php b/includes/Import/Importer.php
index d93a4d8..1d62658 100644
--- a/includes/Import/Importer.php
+++ b/includes/Import/Importer.php
@@ -737,11 +737,10 @@
                $titleRevisions = $this->importObjectWithHistory(
                        $importTopic,
                        function( IObjectRevision $rev ) use ( $state, 
$topicWorkflow ) {
-                               return PostRevision::create(
+                               return PostRevision::createTopicPost(
                                        $topicWorkflow,
                                        $state->createUser( $rev->getAuthor() ),
-                                       $rev->getText(),
-                                       'wikitext'
+                                       $rev->getText()
                                );
                        },
                        'edit-title',
diff --git a/includes/Import/OptInController.php 
b/includes/Import/OptInController.php
index e33de92..b371f12 100644
--- a/includes/Import/OptInController.php
+++ b/includes/Import/OptInController.php
@@ -8,7 +8,7 @@
 use Flow\Collection\HeaderCollection;
 use Flow\NotificationController;
 use Flow\OccupationController;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Flow\RevisionActionPermissions;
 use Flow\WorkflowLoaderFactory;
 use IContextSource;
diff --git a/includes/Import/TemplateHelper.php 
b/includes/Import/TemplateHelper.php
index 67ccac3..36586a5 100644
--- a/includes/Import/TemplateHelper.php
+++ b/includes/Import/TemplateHelper.php
@@ -5,7 +5,7 @@
 use DOMDocument;
 use DOMElement;
 use DOMXPath;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 
 class TemplateHelper {
 
diff --git a/includes/Import/Wikitext/ImportSource.php 
b/includes/Import/Wikitext/ImportSource.php
index 93f0d41..07a0f79 100644
--- a/includes/Import/Wikitext/ImportSource.php
+++ b/includes/Import/Wikitext/ImportSource.php
@@ -3,7 +3,7 @@
 namespace Flow\Import\Wikitext;
 
 use ArrayIterator;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use FlowHooks;
 use Flow\Import\ImportException;
 use Flow\Import\Plain\ImportHeader;
diff --git a/includes/Log/ActionFormatter.php b/includes/Log/ActionFormatter.php
index 4346808..3845526 100644
--- a/includes/Log/ActionFormatter.php
+++ b/includes/Log/ActionFormatter.php
@@ -6,7 +6,7 @@
 use Flow\Container;
 use Flow\Data\ManagerGroup;
 use Flow\Model\UUID;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Flow\Repository\TreeRepository;
 use Flow\UrlGenerator;
 use Message;
diff --git a/includes/Model/AbstractRevision.php 
b/includes/Model/AbstractRevision.php
index ae1ba52..719639f 100644
--- a/includes/Model/AbstractRevision.php
+++ b/includes/Model/AbstractRevision.php
@@ -6,7 +6,7 @@
 use Flow\Exception\DataModelException;
 use Flow\Exception\InvalidDataException;
 use Flow\Exception\PermissionException;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use ContentHandler;
 use Hooks;
 use Title;
@@ -305,7 +305,7 @@
                } else {
                        // reset content length (we may be restoring, in which 
case $obj's
                        // current length will be 0)
-                       $obj->contentLength = mb_strlen( $this->getContent( 
'wikitext' ) );
+                       $obj->contentLength = $this->calculateContentLength();
                }
 
                return $obj;
@@ -349,7 +349,7 @@
         * Templating::getContent, which will do additional (permissions-based)
         * checks to make sure it outputs something the user can see.
         *
-        * @param string[optional] $format Format to output content in 
(html|wikitext)
+        * @param string[optional] $format Format to output content in 
(html|wikitext|topic-title-wikitext|topic-title)
         * @return string
         * @throws InvalidDataException
         */
@@ -371,9 +371,6 @@
                        }
                }
 
-               if ( !$this->isFormatted() ) {
-                       return $raw;
-               }
                if ( !isset( $this->convertedContent[$format] ) ) {
                        if ( $sourceFormat === $format ) {
                                $this->convertedContent[$format] = $raw;
@@ -430,7 +427,7 @@
         * use self::setNextContent
         *
         * @param string $content
-        * @param string $format wikitext|html
+        * @param string $format wikitext|html|topic-title-wikitext
         * @param Title|null $title When null the related workflow will be 
lazy-loaded to locate the title
         * @throws DataModelException
         */
@@ -447,20 +444,26 @@
                        $title = $this->getCollection()->getTitle();
                }
 
+               if ( $format !== 'wikitext' && $format !== 'html' && $format 
!== 'topic-title-wikitext' ) {
+                       throw new DataModelException( 'Invalid format: 
Supported formats for new content are \'wikitext\', \'html\', and 
\'topic-title-wikitext\'' );
+               }
+
                // never trust incoming html - roundtrip to wikitext first
-               if ( $format !== 'wikitext' ) {
+               if ( $format === 'html' ) {
                        $content = Utils::convert( $format, 'wikitext', 
$content, $title  );
                        $format = 'wikitext';
                }
 
-               // Run pre-save transform
-               $content = ContentHandler::makeContent( $content, $title, 
CONTENT_MODEL_WIKITEXT )
-                       ->preSaveTransform(
-                               $title,
-                               $this->getUser(),
-                               WikiPage::factory( $title )->makeParserOptions( 
$this->getUser() )
-                       )
-                       ->serialize( 'text/x-wiki' );
+               if ( $format === 'wikitext' ) {
+                       // Run pre-save transform
+                       $content = ContentHandler::makeContent( $content, 
$title, CONTENT_MODEL_WIKITEXT )
+                               ->preSaveTransform(
+                                       $title,
+                                       $this->getUser(),
+                                       WikiPage::factory( $title 
)->makeParserOptions( $this->getUser() )
+                               )
+                               ->serialize( 'text/x-wiki' );
+               }
 
                // Keep consistent with normal edit page, trim only trailing 
whitespaces
                $content = rtrim( $content );
@@ -468,7 +471,7 @@
 
                // convert content to desired storage format
                $storageFormat = $this->getStorageFormat();
-               if ( $this->isFormatted() && $storageFormat !== $format ) {
+               if ( $storageFormat !== $format ) {
                        $this->convertedContent[$storageFormat] = 
Utils::convert( $format, $storageFormat, $content, $title );
                }
 
@@ -479,7 +482,7 @@
                $this->flags = array_filter( explode( ',', 
\Revision::compressRevisionText( $this->content ) ) );
                $this->flags[] = $storageFormat;
 
-               $this->contentLength = mb_strlen( $this->getContent( 'wikitext' 
) );
+               $this->contentLength = $this->calculateContentLength();
        }
 
        /**
@@ -504,19 +507,6 @@
        }
 
        /**
-        * Determines whether this revision contains formatted content
-        * (i.e. content with separate HTML and WikiText representations)
-        * or unformatted content (i.e. one plaintext representation)
-        * Note that this function may return different values for different
-        * instances of the same class.
-        *
-        * @return boolean True for formatted, False for plaintext
-        */
-       public function isFormatted() {
-               return true;
-       }
-
-       /**
         * @return string The content format of this revision
         */
        public function getContentFormat() {
@@ -525,15 +515,14 @@
 
        /**
         * Determines the appropriate format to store content in.
-        * Usually, the default storage format, but if isFormatted() returns
-        * false, then it will return 'wikitext'.
         * NOTE: The format of the current content is retrieved with 
getContentFormat
         *
         * @return string The name of the storage format.
         */
        protected function getStorageFormat() {
-               global $wgFlowContentFormat;
-               return $this->isFormatted() ? $wgFlowContentFormat : 'wikitext';
+               return $wgFlowContentFormat;
+
+               return $wgFlowContentFormat;
        }
 
        /**
@@ -719,6 +708,13 @@
        /**
         * @return integer
         */
+       protected function calculateContentLength() {
+               return mb_strlen( $this->getContent( 'wikitext' ) );
+       }
+
+       /**
+        * @return integer
+        */
        public function getPreviousContentLength() {
                return $this->previousContentLength;
        }
diff --git a/includes/Model/PostRevision.php b/includes/Model/PostRevision.php
index 116e9c5..9a7d4e3 100644
--- a/includes/Model/PostRevision.php
+++ b/includes/Model/PostRevision.php
@@ -55,10 +55,10 @@
         * @param Workflow $topic
         * @param User $user
         * @param string $content The title of the topic(they are Collection as 
well)
-        * @param string $format wikitext|html
         * @return PostRevision
         */
-       static public function create( Workflow $topic, User $user, $content, 
$format ) {
+       static public function createTopicPost( Workflow $topic, User $user, 
$content ) {
+               $format = 'topic-title-wikitext';
                $obj = static::newFromId( $topic->getId(), $user, $content, 
$format, $topic->getArticleTitle() );
 
                $obj->changeType = 'new-post';
@@ -201,6 +201,37 @@
                return $this->replyToId === null;
        }
 
+       public function getContentFormat() {
+               // The canonical format must always be topic-title-wikitext, 
because we
+               // can not convert 'topic-title-html' to 'topic-title-wikitext'.
+               if ( $this->isTopicTitle() ) {
+                       return 'topic-title-wikitext';
+               } else {
+                       return parent::getContentFormat();
+               }
+       }
+
+       protected function calculateContentLength() {
+               if ( $this->isTopicTitle() ) {
+                       return mb_strlen( $this->getContent( 
'topic-title-wikitext' ) );
+               } else {
+                       return parent::calculateContentLength();
+               }
+       }
+
+       /**
+        * Gets the desired storage format.
+        *
+        * @return string
+        */
+       protected function getStorageFormat() {
+               if ( $this->isTopicTitle() ) {
+                       return 'topic-title-wikitext';
+               } else {
+                       return parent::getStorageFormat();
+               }
+       }
+
        /**
         * @param UUID|null $id
         */
@@ -327,13 +358,6 @@
         */
        public function getRevisionType() {
                return 'post';
-       }
-
-       /**
-        * @return boolean Posts are unformatted if they are title posts, 
formatted otherwise.
-        */
-       public function isFormatted() {
-               return !$this->isTopicTitle();
        }
 
        /**
diff --git a/includes/Notifications/Controller.php 
b/includes/Notifications/Controller.php
index a610318..4c675fe 100644
--- a/includes/Notifications/Controller.php
+++ b/includes/Notifications/Controller.php
@@ -7,7 +7,7 @@
 use Flow\Model\PostRevision;
 use Flow\Model\UUID;
 use Flow\Model\Workflow;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use EchoEvent;
 use Language;
 use Title;
diff --git a/includes/Notifications/Formatter.php 
b/includes/Notifications/Formatter.php
index cc03229..b6542ad 100644
--- a/includes/Notifications/Formatter.php
+++ b/includes/Notifications/Formatter.php
@@ -5,7 +5,7 @@
 use Flow\Exception\FlowException;
 use Flow\Model\Anchor;
 use Flow\Model\UUID;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Flow\Model\Workflow;
 use EchoBasicFormatter;
 use EchoEvent;
diff --git a/includes/OOUI/BoardDescriptionWidget.php 
b/includes/OOUI/BoardDescriptionWidget.php
index 0f401db..714c455 100644
--- a/includes/OOUI/BoardDescriptionWidget.php
+++ b/includes/OOUI/BoardDescriptionWidget.php
@@ -2,12 +2,14 @@
 
 namespace Flow\OOUI;
 
+use Flow\Exception\InvalidInputException;
+
 class BoardDescriptionWidget extends \OOUI\Widget {
 
        protected $editButton;
 
        protected $description = '';
-       protected $descriptionFormat = 'plaintext';
+       protected $descriptionFormat;
 
        public function __construct( array $config = array() ) {
                // Parent constructor
@@ -15,7 +17,10 @@
 
                if ( isset( $config['descriptionFormat'] ) ) {
                        $this->descriptionFormat = $config['descriptionFormat'];
+               } else {
+                       throw new InvalidInputException( 'You must specify a 
descriptionFormat' );
                }
+
                if ( isset( $config['description'] ) ) {
                        $this->description = $config['description'];
                }
diff --git a/includes/Parsoid/ContentFixer.php 
b/includes/Parsoid/ContentFixer.php
index 99f421d..6d5325e 100644
--- a/includes/Parsoid/ContentFixer.php
+++ b/includes/Parsoid/ContentFixer.php
@@ -4,6 +4,7 @@
 
 use DOMDocument;
 use DOMXPath;
+use Flow\Conversion\Utils;
 use Flow\Exception\FlowException;
 use Flow\Model\AbstractRevision;
 use Flow\Model\PostRevision;
diff --git a/includes/Parsoid/Fixer/BadImageRemover.php 
b/includes/Parsoid/Fixer/BadImageRemover.php
index 4d02231..7822651 100644
--- a/includes/Parsoid/Fixer/BadImageRemover.php
+++ b/includes/Parsoid/Fixer/BadImageRemover.php
@@ -6,7 +6,7 @@
 use DOMNode;
 use Flow\Model\PostRevision;
 use Flow\Parsoid\Fixer;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Title;
 
 /**
diff --git a/includes/Parsoid/Fixer/WikiLinkFixer.php 
b/includes/Parsoid/Fixer/WikiLinkFixer.php
index 1c9e6cf..9fc10c1 100644
--- a/includes/Parsoid/Fixer/WikiLinkFixer.php
+++ b/includes/Parsoid/Fixer/WikiLinkFixer.php
@@ -7,7 +7,7 @@
 use DOMNode;
 use Flow\Model\PostRevision;
 use Flow\Parsoid\Fixer;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use LinkBatch;
 use Linker;
 use Title;
diff --git a/includes/Parsoid/ReferenceExtractor.php 
b/includes/Parsoid/ReferenceExtractor.php
index 9445052..0164d6e 100644
--- a/includes/Parsoid/ReferenceExtractor.php
+++ b/includes/Parsoid/ReferenceExtractor.php
@@ -3,6 +3,7 @@
 namespace Flow\Parsoid;
 
 use DOMXPath;
+use Flow\Conversion\Utils;
 use Flow\Exception\InvalidReferenceException;
 use Flow\Model\Reference;
 use Flow\Model\UUID;
diff --git a/includes/Parsoid/ReferenceFactory.php 
b/includes/Parsoid/ReferenceFactory.php
index 5e768be..ee0f8f6 100644
--- a/includes/Parsoid/ReferenceFactory.php
+++ b/includes/Parsoid/ReferenceFactory.php
@@ -2,6 +2,7 @@
 
 namespace Flow\Parsoid;
 
+use Flow\Conversion\Utils;
 use Flow\Model\URLReference;
 use Flow\Model\UUID;
 use Flow\Model\WikiReference;
diff --git a/includes/Search/HeaderUpdater.php 
b/includes/Search/HeaderUpdater.php
index 99e7f79..2a61a95 100644
--- a/includes/Search/HeaderUpdater.php
+++ b/includes/Search/HeaderUpdater.php
@@ -59,9 +59,7 @@
                // get article title associated with this revision
                $title = 
$revision->getCollection()->getWorkflow()->getArticleTitle();
 
-               // make sure we don't parse text that isn't meant to be parsed 
(e.g.
-               // topic titles are never meant to be parsed from wikitext to 
html)
-               $format = $revision->isFormatted() ? 'html' : 'wikitext';
+               $format = 'html';
 
                $creationTimestamp = 
$revision->getCollectionId()->getTimestampObj();
                $updateTimestamp = 
$revision->getRevisionId()->getTimestampObj();
diff --git a/includes/Search/TopicUpdater.php b/includes/Search/TopicUpdater.php
index 0002d28..55d7e55 100644
--- a/includes/Search/TopicUpdater.php
+++ b/includes/Search/TopicUpdater.php
@@ -174,10 +174,6 @@
         * @return array
         */
        public function getRevisionsData( /* PostRevision|PostSummary */ 
$revision ) {
-               // make sure we don't parse text that isn't meant to be parsed 
(e.g.
-               // topic titles are never meant to be parsed from wikitext to 
html)
-               $format = $revision->isFormatted() ? 'html' : 'wikitext';
-
                // store type of revision so we can also search for very 
specific types
                // (e.g. titles only)
                // possible values will be:
@@ -185,8 +181,10 @@
                // * post
                // * post-summary
                $type = $revision->getRevisionType();
+               $format = 'html';
                if ( method_exists( $revision, 'isTopicTitle' ) && 
$revision->isTopicTitle() ) {
                        $type = 'title';
+                       $format = 'topic-title-html';
                }
 
                $data = array();
diff --git a/includes/TemplateHelper.php b/includes/TemplateHelper.php
index 0a1a8f0..b2e0c48 100644
--- a/includes/TemplateHelper.php
+++ b/includes/TemplateHelper.php
@@ -535,7 +535,7 @@
         * @param array $args one or more arguments, i18n key and parameters
         * @param array $named unused
         *
-        * @return string Plaintext
+        * @return string Message output, using the 'text' format
         */
        static public function l10n( array $args, array $named ) {
                $message = null;
diff --git a/includes/Templating.php b/includes/Templating.php
index 2b71ae6..1cdf2ed 100644
--- a/includes/Templating.php
+++ b/includes/Templating.php
@@ -116,15 +116,15 @@
         *
         * The content-type of the return value varies on the $format parameter.
         * Further processing in the final output stage must escape all formats
-        * other than the default 'html'.
+        * other than the default 'html' and 'fixed-html'.
         *
         * @param AbstractRevision $revision Revision to display content for
-        * @param string[optional] $format Format to output content in 
(fixed-html|html|wikitext|plaintext)
+        * @param string[optional] $format Format to output content in 
(fixed-html|html|wikitext|topic-title-html|topic-title-wikitext)
         * @return string HTML if requested, otherwise plain text
         * @throws InvalidInputException
         */
        public function getContent( AbstractRevision $revision, $format = 
'fixed-html' ) {
-               if ( !in_array( $format, array( 'fixed-html', 'html', 
'plaintext', 'wikitext' ) ) ) {
+               if ( !in_array( $format, array( 'fixed-html', 'html', 
'wikitext', 'topic-title-html', 'topic-title-wikitext' ) ) ) {
                        throw new InvalidInputException( 'Invalid format: ' . 
$format );
                }
 
@@ -147,8 +147,6 @@
                                // Parsoid doesn't render redlinks & doesn't 
strip bad images
                                $content = $this->contentFixer->getContent( 
$revision );
                        } else {
-                               // plaintext = wikitext
-                               $format = $format === 'plaintext' ? 'wikitext' 
: $format;
                                $content = $revision->getContent( $format );
                        }
                } catch ( \Exception $e ) {
diff --git a/includes/View.php b/includes/View.php
index a0eb9c5..0639e8f 100644
--- a/includes/View.php
+++ b/includes/View.php
@@ -122,7 +122,7 @@
                }
 
                // Add Parsoid modules if necessary
-               Parsoid\Utils::onFlowAddModules( $out );
+               Conversion\Utils::onFlowAddModules( $out );
                // Allow other extensions to add modules
                Hooks::run( 'FlowAddModules', array( $out ) );
        }
diff --git a/maintenance/convertToText.php b/maintenance/convertToText.php
index 5a5b223..5cd49e8 100644
--- a/maintenance/convertToText.php
+++ b/maintenance/convertToText.php
@@ -1,6 +1,6 @@
 <?php
 
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 
 require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
        ? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
diff --git a/maintenance/repair_missing_revision_content.php 
b/maintenance/repair_missing_revision_content.php
index 90bf6db..380b05e 100644
--- a/maintenance/repair_missing_revision_content.php
+++ b/maintenance/repair_missing_revision_content.php
@@ -284,7 +284,7 @@
                return $cache[$hash];
        }
        try {
-               $wikitext = Flow\Parsoid\Utils::convert( 'html', 'wt', 
$content, Title::newMainPage() );
+               $wikitext = Flow\Conversion\Utils::convert( 'html', 'wt', 
$content, Title::newMainPage() );
                return $cache[$hash] = $wikitext;
        } catch ( Flow\Exception\NoParsoidException $e ) {
                echo "failed to convert to wikitext: " . truncate( $content, 
1024 ) . "\n";
diff --git a/modules/flow/dm/mw.flow.dm.RevisionedContent.js 
b/modules/flow/dm/mw.flow.dm.RevisionedContent.js
index 6f06aeb..d7d2957 100644
--- a/modules/flow/dm/mw.flow.dm.RevisionedContent.js
+++ b/modules/flow/dm/mw.flow.dm.RevisionedContent.js
@@ -177,8 +177,8 @@
         * Get content
         *
         * @return {string} Content; can be in wikitext, html, fixed-html
-        * or plaintext format.
-        * See #getContentFormat for the format of the given content.
+        *  topic-title-wikitext, or topic-title-html format.
+        *  See #getContentFormat for the format of the given content.
         */
        mw.flow.dm.RevisionedContent.prototype.getContent = function () {
                return this.content;
@@ -201,9 +201,10 @@
         * Get content format
         * Possible formats are:
         * - 'wikitext' for unparsed wikitext content
-        * - 'html' for full html content
-        * - 'fixed-html' for parsoid html content
-        * - 'plaintext' for plaintext content
+        * - 'html' for HTML content
+        * - 'fixed-html' for HTML content, adjusted to be suitable for views.
+        * - 'topic-title-wikitext' for the wikitext form of the topic title
+        * - 'topic-title-html' for the HTML form of the topic title
         *
         * @return {string} Content format.
         */
diff --git a/tests/phpunit/Parsoid/UtilsTest.php 
b/tests/phpunit/Conversion/UtilsTest.php
similarity index 95%
rename from tests/phpunit/Parsoid/UtilsTest.php
rename to tests/phpunit/Conversion/UtilsTest.php
index fc2165b..f3c54f4 100644
--- a/tests/phpunit/Parsoid/UtilsTest.php
+++ b/tests/phpunit/Conversion/UtilsTest.php
@@ -1,16 +1,16 @@
 <?php
 
-namespace Flow\Tests\Parsoid;
+namespace Flow\Tests\Conversion;
 
 use Flow\Exception\WikitextException;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Flow\Tests\FlowTestCase;
 use Title;
 
 /**
  * @group Flow
  */
-class ParsoidUtilsTest extends FlowTestCase {
+class ConversionUtilsTest extends FlowTestCase {
 
        static public function createDomProvider() {
                return array(
diff --git a/tests/phpunit/Data/Listener/RecentChangesListenerTest.php 
b/tests/phpunit/Data/Listener/RecentChangesListenerTest.php
index 0a9e8cb..c32d445 100644
--- a/tests/phpunit/Data/Listener/RecentChangesListenerTest.php
+++ b/tests/phpunit/Data/Listener/RecentChangesListenerTest.php
@@ -20,7 +20,7 @@
                                'Reply recent change goes to the topic',
                                NS_TOPIC,
                                function( $workflow, $user ) {
-                                       $first = PostRevision::create( 
$workflow, $user, 'blah blah', 'wikitext' );
+                                       $first = PostRevision::createTopicPost( 
$workflow, $user, 'blah blah' );
                                        return $first->reply( $workflow, $user, 
'fofofo', 'wikitext' );
                                },
                        ),
diff --git a/tests/phpunit/Formatter/RevisionFormatterTest.php 
b/tests/phpunit/Formatter/RevisionFormatterTest.php
index 34bba91..a9b07ce 100644
--- a/tests/phpunit/Formatter/RevisionFormatterTest.php
+++ b/tests/phpunit/Formatter/RevisionFormatterTest.php
@@ -2,10 +2,12 @@
 
 namespace Flow\Tests\Formatter;
 
+use Flow\Exception\FlowException;
 use Flow\FlowActions;
 use Flow\Formatter\FormatterRow;
 use Flow\Formatter\RevisionFormatter;
 use Flow\Model\PostRevision;
+use Flow\Model\UUID;
 use Flow\Model\Workflow;
 use RequestContext;
 use Title;
@@ -17,20 +19,205 @@
 class RevisionFormatterTest extends \MediaWikiTestCase {
        protected $user;
 
+       protected $topicTitleRevisionUnspecified;
+
+       protected $topicTitleRevisionSpecified;
+
+       protected $postRevisionUnspecified;
+
+       protected $postRevisionSpecified;
+
        public function setUp() {
                parent::setUp();
                $this->user = User::newFromName( '127.0.0.1', false );
        }
 
+       /**
+        * @dataProvider decideContentFormatProvider
+        */
+       public function testDecideContentFormat( $expectedFormat, 
$setContentRequestedFormat, $setContentRevisionId, $revision ) {
+               list( $formatter ) = $this->makeFormatter();
+               $formatter->setContentFormat( $setContentRequestedFormat, 
$setContentRevisionId );
+
+               $this->assertEquals(
+                       $expectedFormat,
+                       $formatter->decideContentFormat( $revision )
+               );
+       }
+
+       public function decideContentFormatProvider() {
+               $topicTitleRevisionUnspecified = 
$this->mockTopicTitleRevision();
+               $topicTitleRevisionSpecified = $this->mockTopicTitleRevision();
+
+               $postRevisionUnspecified = $this->mockPostRevision();
+               $postRevisionSpecified = $this->mockPostRevision();
+
+               return array(
+                       array(
+                               'topic-title-html',
+                               'fixed-html',
+                               null,
+                               $topicTitleRevisionUnspecified,
+                       ),
+                       // Specified for a different revision, so uses 
canonicalized
+                       // version of class default (fixed-html => 
topic-title-html).
+                       array(
+                               'topic-title-html',
+                               'topic-title-wikitext',
+                               $topicTitleRevisionSpecified->getRevisionId(),
+                               $topicTitleRevisionUnspecified,
+                       ),
+                       array(
+                               'topic-title-wikitext',
+                               'html',
+                               null,
+                               $topicTitleRevisionUnspecified,
+                       ),
+                       array(
+                               'topic-title-wikitext',
+                               'wikitext',
+                               null,
+                               $topicTitleRevisionUnspecified,
+                       ),
+                       array(
+                               'fixed-html',
+                               'fixed-html',
+                               null,
+                               $postRevisionUnspecified,
+                       ),
+                       // We've specified it, but for another rev ID, so it 
uses the class default
+                       // of fixed-html.
+                       array(
+                               'fixed-html',
+                               'wikitext',
+                               $postRevisionSpecified->getRevisionId(),
+                               $postRevisionUnspecified,
+                       ),
+                       array(
+                               'html',
+                               'html',
+                               null,
+                               $postRevisionUnspecified,
+                       ),
+                       array(
+                               'wikitext',
+                               'wikitext',
+                               null,
+                               $postRevisionUnspecified,
+                       ),
+                       array(
+                               'topic-title-html',
+                               'topic-title-html',
+                               null,
+                               $topicTitleRevisionUnspecified,
+                       ),
+                       array(
+                               'topic-title-wikitext',
+                               'topic-title-wikitext',
+                               null,
+                               $topicTitleRevisionUnspecified,
+                       ),
+                       array(
+                               'topic-title-html',
+                               'topic-title-html',
+                               $topicTitleRevisionSpecified->getRevisionId(),
+                               $topicTitleRevisionSpecified,
+                       ),
+                       array(
+                               'topic-title-wikitext',
+                               'topic-title-wikitext',
+                               $topicTitleRevisionSpecified->getRevisionId(),
+                               $topicTitleRevisionSpecified,
+                       ),
+                       array(
+                               'fixed-html',
+                               'fixed-html',
+                               $postRevisionSpecified->getRevisionId(),
+                               $postRevisionSpecified,
+                       ),
+                       array(
+                               'html',
+                               'html',
+                               $postRevisionSpecified->getRevisionId(),
+                               $postRevisionSpecified,
+                       ),
+                       array(
+                               'wikitext',
+                               'wikitext',
+                               $postRevisionSpecified->getRevisionId(),
+                               $postRevisionSpecified,
+                       ),
+               );
+       }
+
+
+       /**
+        * @expectedException Flow\Exception\FlowException
+        * @dataProvider decideContentInvalidFormatProvider
+        */
+       public function testDecideContentInvalidFormat( 
$setContentRequestedFormat, $setContentRevisionId, $revision ) {
+               list( $formatter ) = $this->makeFormatter();
+               $formatter->setContentFormat( $setContentRequestedFormat, 
$setContentRevisionId );
+               $formatter->decideContentFormat( $revision );
+       }
+
+       public function decideContentInvalidFormatProvider() {
+               $topicTitleRevisionSpecified = $this->mockTopicTitleRevision();
+               $postRevisionSpecified = $this->mockPostRevision();
+               $postRevisionUnspecified = $this->mockPostRevision();
+
+               return array(
+                       array(
+                               'wikitext',
+                               $topicTitleRevisionSpecified->getRevisionId(),
+                               $topicTitleRevisionSpecified,
+                       ),
+                       array(
+                               'topic-title-html',
+                               $postRevisionSpecified->getRevisionId(),
+                               $postRevisionSpecified,
+                       ),
+                       array(
+                               'topic-title-html',
+                               null,
+                               $postRevisionUnspecified,
+                       ),
+               );
+       }
+
+       /**
+        * @expectedException Flow\Exception\FlowException
+        * @dataProvider setContentFormatInvalidProvider
+        */
+       public function testSetContentFormatInvalidProvider( $requestedFormat, 
$revisionId) {
+               list( $formatter ) = $this->makeFormatter();
+               $formatter->setContentFormat( $requestedFormat, $revisionId );
+       }
+
+       public function setContentFormatInvalidProvider() {
+               $postRevisionSpecified = $this->mockPostRevision();
+
+               return array(
+                       array(
+                               'fake-format',
+                               null
+                       ),
+                       array(
+                               'another-fake-format',
+                               $postRevisionSpecified->getRevisionId()
+                       ),
+               );
+       }
+
        public function testMockFormatterBasicallyWorks() {
-               list( $formatter, $ctx ) = $this->mockFormatter();
+               list( $formatter, $ctx ) = $this->makeFormatter();
                $result = $formatter->formatApi( $this->generateRow( 'my new 
topic' ), $ctx );
                $this->assertEquals( 'new-post', $result['changeType'] );
                $this->assertEquals( 'my new topic', 
$result['content']['content'] );
        }
 
        public function testFormattingEditedTitle() {
-               list( $formatter, $ctx ) = $this->mockFormatter();
+               list( $formatter, $ctx ) = $this->makeFormatter();
                $row = $this->generateRow();
                $row->previousRevision = $row->revision;
                $row->revision = $row->revision->newNextRevision(
@@ -49,7 +236,7 @@
                $content = 'something something';
                $nextContent = 'ברוכים הבאים לוויקיפדיה!';
 
-               list( $formatter, $ctx, $permissions, $templating, $usernames, 
$actions ) = $this->mockFormatter( true );
+               list( $formatter, $ctx, $permissions, $templating, $usernames, 
$actions ) = $this->makeFormatter( true );
 
                $row = $this->generateRow( $content );
                $result = $formatter->formatApi( $row, $ctx );
@@ -86,10 +273,10 @@
                );
        }
 
-       public function generateRow( $plaintext = 'titlebar content' ) {
+       public function generateRow( $wikitext = 'titlebar content' ) {
                $row = new FormatterRow;
                $row->workflow = Workflow::create( 'topic', 
Title::newMainPage() );
-               $row->rootPost = PostRevision::create( $row->workflow, 
$this->user, $plaintext, 'wikitext' );
+               $row->rootPost = PostRevision::createTopicPost( $row->workflow, 
$this->user, $wikitext );
                $row->revision = $row->currentRevision = $row->rootPost;
 
                return $row;
@@ -118,6 +305,17 @@
                return $permissions;
        }
 
+       protected function mockPostRevision() {
+               $postRevision = $this->getMockBuilder( 
'Flow\Model\PostRevision' )->getMock();
+               $postRevision->expects( $this->any() )
+                       ->method( 'isTopicTitle' )
+                       ->will( $this->returnValue( false ) );
+               $postRevision->expects( $this->any() )
+                       ->method( 'getRevisionId' )
+                       ->will( $this->returnValue( UUID::create() ) );
+               return $postRevision;
+       }
+
        protected function mockTemplating() {
                $templating = $this->getMockBuilder( 'Flow\Templating' )
                        ->disableOriginalConstructor()
@@ -134,14 +332,24 @@
                return $templating;
        }
 
+       protected function mockTopicTitleRevision() {
+               $topicTitleRevision = $this->getMockBuilder( 
'Flow\Model\PostRevision' )->getMock();
+               $topicTitleRevision->expects( $this->any() )
+                       ->method( 'isTopicTitle' )
+                       ->will( $this->returnValue( true ) );
+               $topicTitleRevision->expects( $this->any() )
+                       ->method( 'getRevisionId' )
+                       ->will( $this->returnValue( UUID::create() ) );
+               return $topicTitleRevision;
+       }
+
        protected function mockUserNameBatch() {
                return $this->getMockBuilder( 'Flow\Repository\UserNameBatch' )
                        ->disableOriginalConstructor()
                        ->getMock();
        }
 
-       // @todo name seems wrong, the Formatter is real everything else is 
mocked
-       public function mockFormatter( $returnAll = false ) {
+       public function makeFormatter( $returnAll = false ) {
                $actions = $this->mockActions();
                $permissions = $this->mockPermissions( $actions );
                // formatting only proceedes when this is true
diff --git a/tests/phpunit/HookTest.php b/tests/phpunit/HookTest.php
index b3cf4cf..d3e5cfe 100644
--- a/tests/phpunit/HookTest.php
+++ b/tests/phpunit/HookTest.php
@@ -62,7 +62,7 @@
                                ->getWorkflow();
                        $topicWorkflow = Workflow::create( 'topic', 
$boardWorkflow->getArticleTitle() );
                        $topicList = TopicListEntry::create( $boardWorkflow, 
$topicWorkflow );
-                       $topicTitle = PostRevision::create( $topicWorkflow, 
$user, 'some content', 'wikitext' );
+                       $topicTitle = PostRevision::createTopicPost( 
$topicWorkflow, $user, 'some content' );
                        $metadata = array(
                                'workflow' => $topicWorkflow,
                                'board-workflow' => $boardWorkflow,
diff --git a/tests/phpunit/Import/PageImportStateTest.php 
b/tests/phpunit/Import/PageImportStateTest.php
index bceaf55..85fbf86 100644
--- a/tests/phpunit/Import/PageImportStateTest.php
+++ b/tests/phpunit/Import/PageImportStateTest.php
@@ -73,11 +73,10 @@
                        'topic',
                        Title::newMainPage()
                );
-               $topicTitle = PostRevision::create(
+               $topicTitle = PostRevision::createTopicPost(
                        $topicWorkflow,
                        User::newFromName( '127.0.0.1', false ),
-                       'sing song',
-                       'wikitext'
+                       'sing song'
                );
 
                $now = time();
@@ -97,7 +96,7 @@
                $user = User::newFromName( '127.0.0.1', false );
                $title = Title::newMainPage();
                $topicWorkflow = Workflow::create( 'topic', $title );
-               $topicTitle = PostRevision::create( $topicWorkflow, $user, 
'sing song', 'wikitext' );
+               $topicTitle = PostRevision::createTopicPost( $topicWorkflow, 
$user, 'sing song' );
                $reply = $topicTitle->reply( $topicWorkflow, $user, 
'fantastic!', 'wikitext' );
 
                $now = time();
diff --git a/tests/phpunit/Import/Wikitext/ImportSourceTest.php 
b/tests/phpunit/Import/Wikitext/ImportSourceTest.php
index 8c1db61..0b224c8 100644
--- a/tests/phpunit/Import/Wikitext/ImportSourceTest.php
+++ b/tests/phpunit/Import/Wikitext/ImportSourceTest.php
@@ -6,7 +6,7 @@
 use DateTimeZone;
 use Flow\Exception\WikitextException;
 use Flow\Import\Wikitext\ImportSource;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Parser;
 use Title;
 use WikiPage;
diff --git a/tests/phpunit/LinksTableTest.php b/tests/phpunit/LinksTableTest.php
index 376e0c6..fb7dfcd 100644
--- a/tests/phpunit/LinksTableTest.php
+++ b/tests/phpunit/LinksTableTest.php
@@ -13,7 +13,7 @@
 use Flow\Model\Workflow;
 use Flow\Parsoid\ReferenceExtractor;
 use Flow\Parsoid\ReferenceFactory;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use ParserOutput;
 use Title;
 
diff --git a/tests/phpunit/Model/PostRevisionTest.php 
b/tests/phpunit/Model/PostRevisionTest.php
index ce8849b..888b163 100644
--- a/tests/phpunit/Model/PostRevisionTest.php
+++ b/tests/phpunit/Model/PostRevisionTest.php
@@ -42,7 +42,7 @@
                $user = User::newFromName( '127.0.0.1', false );
                $workflow = Workflow::create( 'topic', $title );
 
-               $topic = PostRevision::create( $workflow, $user, $content, 
'wikitext' );
+               $topic = PostRevision::createTopicPost( $workflow, $user, 
$content );
                $this->assertEquals( 0, $topic->getPreviousContentLength() );
                $this->assertEquals( mb_strlen( $content ), 
$topic->getContentLength() );
 
diff --git a/tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php 
b/tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php
index e9781ea..a40d2e9 100644
--- a/tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php
+++ b/tests/phpunit/Parsoid/Fixer/BadImageRemoverTest.php
@@ -4,7 +4,7 @@
 
 use Flow\Parsoid\Fixer\BadImageRemover;
 use Flow\Parsoid\ContentFixer;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Title;
 
 /**
diff --git a/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php 
b/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php
index 308d8b2..3ce4948 100644
--- a/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php
+++ b/tests/phpunit/Parsoid/Fixer/WikiLinkFixerTest.php
@@ -5,7 +5,7 @@
 use Flow\Model\UUID;
 use Flow\Parsoid\ContentFixer;
 use Flow\Parsoid\Fixer\WikiLinkFixer;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Flow\Tests\PostRevisionTestCase;
 use Html;
 use Title;
diff --git a/tests/phpunit/Parsoid/ReferenceExtractorTest.php 
b/tests/phpunit/Parsoid/ReferenceExtractorTest.php
index b7af650..4b3fa71 100644
--- a/tests/phpunit/Parsoid/ReferenceExtractorTest.php
+++ b/tests/phpunit/Parsoid/ReferenceExtractorTest.php
@@ -6,7 +6,7 @@
 use Flow\Exception\WikitextException;
 use Flow\Model\UUID;
 use Flow\Parsoid\ReferenceFactory;
-use Flow\Parsoid\Utils;
+use Flow\Conversion\Utils;
 use Flow\Tests\FlowTestCase;
 use ReflectionMethod;
 use Title;
diff --git a/tests/phpunit/SpamFilter/ConfirmEditTest.php 
b/tests/phpunit/SpamFilter/ConfirmEditTest.php
index c66eea0..fc13b68 100644
--- a/tests/phpunit/SpamFilter/ConfirmEditTest.php
+++ b/tests/phpunit/SpamFilter/ConfirmEditTest.php
@@ -21,7 +21,7 @@
                $title = Title::newMainPage();
                $workflow = Workflow::create( 'topic', $title );
 
-               $oldRevision = PostRevision::create( $workflow, $user, 'foo', 
'wikitext' );
+               $oldRevision = PostRevision::createTopicPost( $workflow, $user, 
'foo' );
                $newRevision = $oldRevision->newNextRevision( $user, 'bar', 
'wikitext', 'change-type', $title );
 
                $request = $this->getMock( 'WebRequest' );
diff --git a/tests/phpunit/SpamFilter/ContentLengthFilterTest.php 
b/tests/phpunit/SpamFilter/ContentLengthFilterTest.php
index bfa548c..0f3c2a9 100644
--- a/tests/phpunit/SpamFilter/ContentLengthFilterTest.php
+++ b/tests/phpunit/SpamFilter/ContentLengthFilterTest.php
@@ -48,7 +48,7 @@
                $title = Title::newFromText( 'UTPage' );
                $user = User::newFromName( '127.0.0.1', false );
                $workflow = Workflow::create( 'topic', $title );
-               $topic = PostRevision::create( $workflow, $user, 'title 
content', 'wikitext' );
+               $topic = PostRevision::createTopicPost( $workflow, $user, 
'title content' );
                $reply = $topic->reply( $workflow, $user, $content, 'wikitext' 
);
 
                $spamFilter = new ContentLengthFilter( $maxLength );
diff --git a/tests/phpunit/TemplatingTest.php b/tests/phpunit/TemplatingTest.php
index 31167ea..81edbfe 100644
--- a/tests/phpunit/TemplatingTest.php
+++ b/tests/phpunit/TemplatingTest.php
@@ -43,7 +43,7 @@
                $user = User::newFromName( '127.0.0.1', false );
                $title = Title::newMainPage();
                $workflow = Workflow::create( 'topic', $title );
-               $topicTitle = PostRevision::create( $workflow, $user, 'some 
content', 'wikitext' );
+               $topicTitle = PostRevision::createTopicPost( $workflow, $user, 
'some content' );
 
                $hidden = $topicTitle->moderate(
                        $user,
diff --git a/tests/phpunit/api/ApiFlowEditTitleTest.php 
b/tests/phpunit/api/ApiFlowEditTitleTest.php
index 56c4cec..1a3c2d6 100644
--- a/tests/phpunit/api/ApiFlowEditTitleTest.php
+++ b/tests/phpunit/api/ApiFlowEditTitleTest.php
@@ -41,6 +41,6 @@
                $this->assertArrayHasKey( 'changeType', $revision, $debug );
                $this->assertEquals( 'edit-title', $revision['changeType'], 
$debug );
                $this->assertEquals( '(ノ◕ヮ◕)ノ*:・ ゚ ゚ ゚ ゚ ゚ ゚ ゚ ゚✧', 
$revision['content']['content'], $debug );
-               $this->assertEquals( 'plaintext', 
$revision['content']['format'], $debug );
+               $this->assertEquals( 'topic-title-html', 
$revision['content']['format'], $debug );
        }
 }
diff --git a/tests/phpunit/api/ApiFlowViewTopicListTest.php 
b/tests/phpunit/api/ApiFlowViewTopicListTest.php
index d9d6f75..ce2fb2d 100644
--- a/tests/phpunit/api/ApiFlowViewTopicListTest.php
+++ b/tests/phpunit/api/ApiFlowViewTopicListTest.php
@@ -31,7 +31,7 @@
                        $topicData[$i]['expectedRevision'] = array(
                                'content' => array(
                                        'content' => $title,
-                                       'format' => 'plaintext'
+                                       'format' => 'topic-title-wikitext'
                                ),
                                // This last_updated is used for the 'newest' 
test, then later changed for 'updated' test.
                                'last_updated' => 
$actualRevision['last_updated'],
diff --git a/tests/qunit/flow/dm/test_mw.flow.dm.Board.js 
b/tests/qunit/flow/dm/test_mw.flow.dm.Board.js
index 13afbcc..d69f84f 100644
--- a/tests/qunit/flow/dm/test_mw.flow.dm.Board.js
+++ b/tests/qunit/flow/dm/test_mw.flow.dm.Board.js
@@ -46,21 +46,21 @@
                                                new mw.flow.dm.Topic( 'topic1', 
{
                                                        content: {
                                                                content: 'Topic 
1',
-                                                               format: 
'plaintext'
+                                                               format: 
'topic-title-wikitext'
                                                        },
                                                        last_updated: 
'123123123'
                                                } ),
                                                new mw.flow.dm.Topic( 'topic2', 
{
                                                        content: {
                                                                content: 'Topic 
2',
-                                                               format: 
'plaintext'
+                                                               format: 
'topic-title-wikitext'
                                                        },
                                                        last_updated: 
'123123321'
                                                } ),
                                                new mw.flow.dm.Topic( 'topic3', 
{
                                                        content: {
                                                                content: 'Topic 
3',
-                                                               format: 
'plaintext'
+                                                               format: 
'topic-title-wikitext'
                                                        },
                                                        last_updated: 
'123123543'
                                                } )
diff --git a/tests/qunit/flow/dm/test_mw.flow.dm.Post.js 
b/tests/qunit/flow/dm/test_mw.flow.dm.Post.js
index 26190bf..904d088 100644
--- a/tests/qunit/flow/dm/test_mw.flow.dm.Post.js
+++ b/tests/qunit/flow/dm/test_mw.flow.dm.Post.js
@@ -53,7 +53,7 @@
                                        isModeratedNotLocked: false,
                                        content: {
                                                content: 'Topic with 
hierarchical posts',
-                                               format: 'plaintext'
+                                               format: 'topic-title-wikitext'
                                        },
                                        isWatched: true,
                                        watchable: true,
diff --git a/tests/qunit/flow/dm/test_mw.flow.dm.System.js 
b/tests/qunit/flow/dm/test_mw.flow.dm.System.js
index d39356f..7d8989a 100644
--- a/tests/qunit/flow/dm/test_mw.flow.dm.System.js
+++ b/tests/qunit/flow/dm/test_mw.flow.dm.System.js
@@ -43,7 +43,7 @@
                                        dateFormats: [],
                                        properties: {
                                                'topic-of-post': {
-                                                       plaintext: 'This is a 
test content in plaintext.'
+                                                       plaintext: 'This is a 
test content in topic-title-wikitext.'
                                                }
                                        },
                                        isOriginalContent: true,
@@ -81,8 +81,8 @@
                                        lastEditId: null,
                                        previousRevisionId: null,
                                        content: {
-                                               content: 'This is a test 
content in plaintext.',
-                                               format: 'plaintext'
+                                               content: 'This is a test 
content in topic-title-wikitext.',
+                                               format: 'topic-title-wikitext'
                                        },
                                        watchable: false,
                                        replyToId: null,
diff --git a/tests/qunit/flow/dm/test_mw.flow.dm.Topic.js 
b/tests/qunit/flow/dm/test_mw.flow.dm.Topic.js
index 5f098c0..1f8892b 100644
--- a/tests/qunit/flow/dm/test_mw.flow.dm.Topic.js
+++ b/tests/qunit/flow/dm/test_mw.flow.dm.Topic.js
@@ -138,7 +138,7 @@
                                        previousRevisionId: null,
                                        content: {
                                                content: 'This is the title of 
the topic.',
-                                               format: 'plaintext'
+                                               format: 'topic-title-wikitext'
                                        },
                                        isWatched: true,
                                        watchable: true,
@@ -194,7 +194,7 @@
                                },
                                {
                                        method: 'getContentFormat',
-                                       expected: 'plaintext',
+                                       expected: 'topic-title-wikitext',
                                        msg: 'Get topic content format'
                                },
                                {

-- 
To view, visit https://gerrit.wikimedia.org/r/243066
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d6bd8090de242c2b1761003cce04d590d7f9ae6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to