Update jquery.ui Vector theme to 1.9.2
[lhc/web/wiklou.git] / includes / content / CssContent.php
index 03cc2d0..2673084 100644 (file)
  * @ingroup Content
  */
 class CssContent extends TextContent {
+
+       /**
+        * @param string $text CSS code.
+        */
        public function __construct( $text ) {
                parent::__construct( $text, CONTENT_MODEL_CSS );
        }
@@ -39,10 +43,13 @@ class CssContent extends TextContent {
         * Returns a Content object with pre-save transformations applied using
         * Parser::preSaveTransform().
         *
-        * @param $title Title
-        * @param $user User
-        * @param $popts ParserOptions
-        * @return Content
+        * @param Title $title
+        * @param User $user
+        * @param ParserOptions $popts
+        *
+        * @return CssContent
+        *
+        * @see TextContent::preSaveTransform
         */
        public function preSaveTransform( Title $title, User $user, ParserOptions $popts ) {
                global $wgParser;
@@ -54,12 +61,16 @@ class CssContent extends TextContent {
                return new CssContent( $pst );
        }
 
+       /**
+        * @return string CSS wrapped in a <pre> tag.
+        */
        protected function getHtml() {
                $html = "";
                $html .= "<pre class=\"mw-code mw-css\" dir=\"ltr\">\n";
-               $html .= $this->getHighlightHtml();
+               $html .= htmlspecialchars( $this->getNativeData() );
                $html .= "\n</pre>\n";
 
                return $html;
        }
+
 }