]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/TinyMCE/TinyMCEPlugin.php
Unifying HTML stripping functions to common_strip_html
[quix0rs-gnu-social.git] / plugins / TinyMCE / TinyMCEPlugin.php
index fff313834749c86c5c2f2cb66e612bad171e3eef..08da1048fc12f282fee1cac7988c904bd13b6836 100644 (file)
@@ -104,17 +104,6 @@ class TinyMCEPlugin extends Plugin
         return htmLawed($raw, $config);
     }
 
-    /**
-     * Strip HTML to plaintext string
-     *
-     * @param string $html HTML
-     * @return string plaintext, single line
-     */
-    private function stripHtml($html)
-    {
-        return str_replace("\n", " ", html_entity_decode(strip_tags($html), ENT_QUOTES, 'UTF-8'));
-    }
-
     /**
      * Hook for new-notice form processing to take our HTML goodies;
      * won't affect API posting etc.
@@ -130,7 +119,7 @@ class TinyMCEPlugin extends Plugin
         if ($action->arg('richedit') && $this->isAllowedRichEdit()) {
             $html = $this->sanitizeHtml($content);
             $options['rendered'] = $html;
-            $content = $this->stripHtml($html);
+            $content = common_strip_html($html);
         }
         return true;
     }