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
This commit is contained in:
parent
60825ba535
commit
8260a88f41
@ -38,7 +38,7 @@ class DirectionDetectorPlugin extends Plugin {
|
|||||||
* @param object $notice notice is going to be saved
|
* @param object $notice notice is going to be saved
|
||||||
*/
|
*/
|
||||||
public function onStartNoticeSave(&$notice){
|
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>';
|
$notice->rendered = '<span class="rtl">'.$notice->rendered.'</span>';
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user