]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/DirectionDetector/DirectionDetectorPlugin.php
Quick fix for DirectionDetector: only apply <span class="rtl"> once; if it's already...
[quix0rs-gnu-social.git] / plugins / DirectionDetector / DirectionDetectorPlugin.php
index 0277e02c56ffe895b7dfc9f8d26d53e542508441..34c511e21d49c413c8d96f09dff59ec024af3526 100644 (file)
@@ -38,7 +38,7 @@ class DirectionDetectorPlugin extends Plugin {
         * @param object $notice notice is going to be saved
         */
        public function onStartNoticeSave(&$notice){
-               if(self::isRTL($notice->content))
+               if(!preg_match('/<span class="rtl">/', $notice->rendered) && self::isRTL($notice->content))
                        $notice->rendered = '<span class="rtl">'.$notice->rendered.'</span>';
                return true;
        }