summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-05-05 11:28:05 -0700
committerBrion Vibber <brion@pobox.com>2010-05-05 11:28:05 -0700
commit8260a88f41bb21fe5e5bd25dea15283a08c2224c (patch)
tree63fbdbb478420a3a5a1f8fbca6b03aaf5ce812bc
parent60825ba535763838059797db03cc32cf07276de0 (diff)
Quick fix for DirectionDetector: only apply <span class="rtl"> once; if it's already there in an incoming message (eg via OStatus), don't reapply it.
Modified from patch from Everplays
-rw-r--r--plugins/DirectionDetector/DirectionDetectorPlugin.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php
index 0277e02c5..34c511e21 100644
--- a/plugins/DirectionDetector/DirectionDetectorPlugin.php
+++ b/plugins/DirectionDetector/DirectionDetectorPlugin.php
@@ -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;
}