Merge "Sanitizer::escapeId: Decode entity before replacing spaces"
[lhc/web/wiklou.git] / includes / content / JSONContentHandler.php
index 6b77527..33f2036 100644 (file)
@@ -16,6 +16,8 @@ class JSONContentHandler extends TextContentHandler {
        /**
         * The class name of objects that should be created
         *
+        * @deprecated override getContentClass instead
+        *
         * @var string
         */
        protected $contentClass = 'JSONContent';
@@ -25,25 +27,13 @@ class JSONContentHandler extends TextContentHandler {
        }
 
        /**
-        * Unserializes a JSONContent object.
-        *
-        * @param string $text Serialized form of the content
-        * @param null|string $format The format used for serialization
-        *
-        * @return JSONContent
-        */
-       public function unserializeContent( $text, $format = null ) {
-               $this->checkFormat( $format );
-               return new $this->contentClass( $text );
-       }
-
-       /**
-        * Creates an empty JSONContent object.
+        * Temporary back-compat until extensions
+        * are updated to override this
         *
-        * @return JSONContent
+        * @return string
         */
-       public function makeEmptyContent() {
-               return new $this->contentClass( '' );
+       protected function getContentClass() {
+               return $this->contentClass;
        }
 
        /**