From d317fb5d70f8903dc518943c731202869d450d68 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Fri, 2 Aug 2013 14:04:04 +0100 Subject: fixed some bi-directionality issues Fixed some issues which occur whenever RTL and LTR languages could potentially be mixed, using the HTML5 `` element. This element is currently only supported by Chrome and Firefox. The old and only partially working fix for tpl_breadcrumbs() was removed in favour of this solution. --- inc/html.php | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'inc/html.php') diff --git a/inc/html.php b/inc/html.php index 614cf172c..2d2bb8a7c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -575,18 +575,18 @@ function html_revisions($first=0, $media_id = false){ if ($info['sum']) { $form->addElement(form_makeOpenTag('span', array('class' => 'sum'))); if (!$media_id) $form->addElement(' – '); - $form->addElement(htmlspecialchars($info['sum'])); + $form->addElement(''.htmlspecialchars($info['sum']).''); $form->addElement(form_makeCloseTag('span')); } $form->addElement(form_makeOpenTag('span', array('class' => 'user'))); if($info['user']){ - $form->addElement(editorinfo($info['user'])); + $form->addElement(''.editorinfo($info['user']).''); if(auth_ismanager()){ - $form->addElement(' ('.$info['ip'].')'); + $form->addElement(' ('.$info['ip'].')'); } }else{ - $form->addElement($info['ip']); + $form->addElement(''.$info['ip'].''); } $form->addElement(form_makeCloseTag('span')); @@ -774,12 +774,12 @@ function html_recent($first=0, $show_changes='both'){ $form->addElement(form_makeOpenTag('span', array('class' => 'user'))); if($recent['user']){ - $form->addElement(editorinfo($recent['user'])); + $form->addElement(''.editorinfo($recent['user']).''); if(auth_ismanager()){ - $form->addElement(' ('.$recent['ip'].')'); + $form->addElement(' ('.$recent['ip'].')'); } }else{ - $form->addElement($recent['ip']); + $form->addElement(''.$recent['ip'].''); } $form->addElement(form_makeCloseTag('span')); @@ -1027,52 +1027,52 @@ function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = fa }else{ $l_info = getRevisionInfo($id,$l_rev,true, $media); if($l_info['user']){ - $l_user = editorinfo($l_info['user']); - if(auth_ismanager()) $l_user .= ' ('.$l_info['ip'].')'; + $l_user = ''.editorinfo($l_info['user']).''; + if(auth_ismanager()) $l_user .= ' ('.$l_info['ip'].')'; } else { - $l_user = $l_info['ip']; + $l_user = ''.$l_info['ip'].''; } $l_user = ''.$l_user.''; - $l_sum = ($l_info['sum']) ? ''.hsc($l_info['sum']).'' : ''; + $l_sum = ($l_info['sum']) ? ''.hsc($l_info['sum']).'' : ''; if ($l_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $l_minor = 'class="minor"'; $l_head_title = ($media) ? dformat($l_rev) : $id.' ['.dformat($l_rev).']'; - $l_head = ''. - $l_head_title.''. + $l_head = ''. + $l_head_title.''. $head_separator.$l_user.' '.$l_sum; } if($r_rev){ $r_info = getRevisionInfo($id,$r_rev,true, $media); if($r_info['user']){ - $r_user = editorinfo($r_info['user']); - if(auth_ismanager()) $r_user .= ' ('.$r_info['ip'].')'; + $r_user = ''.editorinfo($r_info['user']).''; + if(auth_ismanager()) $r_user .= ' ('.$r_info['ip'].')'; } else { - $r_user = $r_info['ip']; + $r_user = ''.$r_info['ip'].''; } $r_user = ''.$r_user.''; - $r_sum = ($r_info['sum']) ? ''.hsc($r_info['sum']).'' : ''; + $r_sum = ($r_info['sum']) ? ''.hsc($r_info['sum']).'' : ''; if ($r_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $r_minor = 'class="minor"'; $r_head_title = ($media) ? dformat($r_rev) : $id.' ['.dformat($r_rev).']'; - $r_head = ''. - $r_head_title.''. + $r_head = ''. + $r_head_title.''. $head_separator.$r_user.' '.$r_sum; }elseif($_rev = @filemtime($media_or_wikiFN($id))){ $_info = getRevisionInfo($id,$_rev,true, $media); if($_info['user']){ - $_user = editorinfo($_info['user']); - if(auth_ismanager()) $_user .= ' ('.$_info['ip'].')'; + $_user = ''.editorinfo($_info['user']).''; + if(auth_ismanager()) $_user .= ' ('.$_info['ip'].')'; } else { - $_user = $_info['ip']; + $_user = ''.$_info['ip'].''; } $_user = ''.$_user.''; - $_sum = ($_info['sum']) ? ''.hsc($_info['sum']).'' : ''; + $_sum = ($_info['sum']) ? ''.hsc($_info['sum']).'' : ''; if ($_info['type']===DOKU_CHANGE_TYPE_MINOR_EDIT) $r_minor = 'class="minor"'; $r_head_title = ($media) ? dformat($_rev) : $id.' ['.dformat($_rev).']'; - $r_head = ''. - $r_head_title.' '. + $r_head = ''. + $r_head_title.' '. '('.$lang['current'].')'. $head_separator.$_user.' '.$_sum; }else{ -- cgit v1.2.3