We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 8260a88f authored by Brion Vibber's avatar Brion Vibber

Quick fix for DirectionDetector: only apply <span class="rtl"> once; if it's...

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
parent 60825ba5
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment