Merge pull request #10192 from MrPetovan/task/8262-rtl-user-content

Add initial support for RTL in user-submitted content
This commit is contained in:
Michael Vogel 2021-05-01 22:53:27 +02:00 committed by GitHub
commit 35ad732e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 38 additions and 38 deletions

View File

@ -50,7 +50,7 @@ use Friendica\Util\XML;
class BBCode
{
// Update this value to the current date whenever changes are made to BBCode::convert
const VERSION = '2021-04-24';
const VERSION = '2021-05-01';
const INTERNAL = 0;
const API = 2;
@ -1731,7 +1731,7 @@ class BBCode
$text);
} elseif (!$simple_html) {
$text = preg_replace("/([@!])\[url\=(.*?)\](.*?)\[\/url\]/ism",
'$1<a href="$2" class="userinfo mention" title="$3">$3</a>',
'$1<a href="$2" class="userinfo mention" title="$3"><bdi>$3</bdi></a>',
$text);
}

View File

@ -1,7 +1,7 @@
<div class="vcard h-card">
<div class="fn p-name">{{$profile.name}}</div>
<div class="fn p-name" dir="auto">{{$profile.name}}</div>
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
@ -13,7 +13,7 @@
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
{{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
{{if $location}}
<dl class="location">
<dl class="location" dir="auto">
<dt class="location-label">{{$location}}</dt>
<dd class="adr h-adr">
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
@ -37,7 +37,7 @@
{{if $homepage}}<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt><dd class="homepage-url u-url"><a href="{{$profile.homepage}}" rel="me" target="_blank" rel="noopener noreferrer">{{$profile.homepage}}</a></dd></dl>{{/if}}
{{if $about}}<dl class="about"><dt class="about-label">{{$about}}</dt><dd class="x-network">{{$profile.about nofilter}}</dd></dl>{{/if}}
{{if $about}}<dl class="about"><dt class="about-label">{{$about}}</dt><dd class="x-network" dir="auto">{{$profile.about nofilter}}</dd></dl>{{/if}}
{{include file="diaspora_vcard.tpl"}}

View File

@ -59,7 +59,7 @@
<div class="wall-item-title p-name" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
<div class="wall-item-title-end"></div>
<div class="wall-item-body" id="wall-item-body-{{$item.id}}">
<span class="e-content">{{$item.body_html nofilter}}<span>
<span class="e-content" dir="auto">{{$item.body_html nofilter}}<span>
<div class="body-tag">
{{if !$item.suppress_tags}}
{{foreach $item.tags as $tag}}

View File

@ -1,8 +1,8 @@
<div class="vcard h-card">
<div class="fn p-name">{{$name}}</div>
<div class="fn p-name" dir="auto">{{$name}}</div>
{{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}}
{{if $about}}<div class="title p-job-title">{{$about nofilter}}</div>{{/if}}
{{if $about}}<div class="title p-about" dir="auto">{{$about nofilter}}</div>{{/if}}
{{if $url}}
<div id="profile-photo-wrapper"><a href="{{$url}}"><img class="vcard-photo photo u-photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></a></div>
{{else}}

View File

@ -1,7 +1,7 @@
<div class="vcard h-card">
<div class="fn p-name">{{$profile.name}}</div>
<div class="fn p-name" dir="auto">{{$profile.name}}</div>
{{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
@ -12,7 +12,7 @@
{{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
{{if $location}}
<dl class="location">
<dl class="location" dir="auto">
<dt class="location-label">{{$location}}</dt>
<dd class="adr h-adr">
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
@ -21,7 +21,7 @@
</dl>
{{/if}}
{{if $profile.about}}<div class="title">{{$profile.about nofilter}}</div>{{/if}}
{{if $profile.about}}<div class="title" dir="auto">{{$profile.about nofilter}}</div>{{/if}}
{{if $profile.upubkey}}<div class="key" style="display:none;">{{$profile.upubkey}}</div>{{/if}}

View File

@ -37,11 +37,11 @@
<div class="panel-body">
<div class="profile-header">
<h3 class="fn p-name">{{$profile.name}}</h3>
<h3 class="fn p-name" dir="auto">{{$profile.name}}</h3>
{{if $profile.addr}}<div class="p-addr">{{include file="sub/punct_wrap.tpl" text=$profile.addr}}</div>{{/if}}
{{if $profile.about}}<div class="title">{{$profile.about nofilter}}</div>{{/if}}
{{if $profile.about}}<div class="title" dir="auto">{{$profile.about nofilter}}</div>{{/if}}
{{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}}
</div>

View File

@ -246,7 +246,7 @@ as the value of $top_child_total (this is done at the end of this file)
<span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h4><br /></span>
{{/if}}
<div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}" id="wall-item-body-{{$item.id}}">{{$item.body_html nofilter}}</div>
<div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}" id="wall-item-body-{{$item.id}}" dir="auto">{{$item.body_html nofilter}}</div>
</div>
<!-- TODO -->

View File

@ -16,7 +16,7 @@
</div>
<div id="vcard-short-desc" class="media-body">
<h4 class="media-heading">{{$name}}</h4>
<h4 class="media-heading" dir="auto">{{$name}}</h4>
{{if $addr}}<div class="vcard-short-addr">{{$addr}}</div>{{/if}}
</div>
</div>
@ -24,13 +24,13 @@
<div class="panel-body">
<div class="profile-header">
<h3 class="fn p-name">{{$name}}</h3>
<h3 class="fn p-name" dir="auto">{{$name}}</h3>
{{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}}
{{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}}
{{if $about}}<div class="title">{{$about nofilter}}</div>{{/if}}
{{if $about}}<div class="title" dir="auto">{{$about nofilter}}</div>{{/if}}
{{if $network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_link nofilter}}</dd></dl>{{/if}}
</div>

View File

@ -1,7 +1,7 @@
<div class="vcard h-card">
<div class="tool">
<div class="fn p-name">{{$profile.name}}</div>
<div class="fn p-name" dir="auto">{{$profile.name}}</div>
{{if $profile.edit}}
<div class="action">
<a class="icon s16 edit ttright" href="#" rel="#profiles-menu" title="{{$profile.edit.3}}"><span>{{$profile.edit.1}}</span></a>
@ -24,23 +24,23 @@
{{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
{{if $location}}
<dl class="location">
<dt class="location-label">{{$location}}</dt>
<dd class="adr h-adr">
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
{{if $profile.location}}<p class="p-location">{{$profile.location}}</p>{{/if}}
</dd>
</dl>
<dl class="location" dir="auto">
<dt class="location-label">{{$location}}</dt>
<dd class="adr h-adr">
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
{{if $profile.location}}<p class="p-location">{{$profile.location}}</p>{{/if}}
</dd>
</dl>
{{/if}}
{{if $about}}<div class="title">{{$profile.about nofilter}}</div>{{/if}}
{{if $about}}<div class="title" dir="auto">{{$profile.about nofilter}}</div>{{/if}}
{{if $profile.xmpp}}
<dl class="xmpp">
<dt class="xmpp-label">{{$xmpp}}</dt>
<dd class="xmpp-data">{{$profile.xmpp}}</dd>
</dl>
{{/if}}
{{if $profile.xmpp}}
<dl class="xmpp">
<dt class="xmpp-label">{{$xmpp}}</dt>
<dd class="xmpp-data">{{$profile.xmpp}}</dd>
</dl>
{{/if}}
{{if $profile.upubkey}}<div class="key" style="display:none;">{{$profile.upubkey}}</div>{{/if}}

View File

@ -54,7 +54,7 @@
</div>
<div class="wall-item-content">
{{if $item.title}}<h2><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h2>{{/if}}
<div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body_html nofilter}}</div>
<div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}" dir="auto">{{$item.body_html nofilter}}</div>
</div>
</div>
<div class="wall-item-bottom">

View File

@ -63,7 +63,7 @@
<div class="wall-item-title p-name" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
<div class="wall-item-title-end"></div>
<div class="wall-item-body" id="wall-item-body-{{$item.id}}">
<span class="e-content">{{$item.body_html nofilter}}</span>
<span class="e-content" dir="auto">{{$item.body_html nofilter}}</span>
<div class="body-tag">
{{if !$item.suppress_tags}}
{{foreach $item.tags as $tag}}

View File

@ -1,7 +1,7 @@
<div class="vcard h-card">
<div class="tool">
<div class="fn p-name">{{$profile.name}}</div>
<div class="fn p-name" dir="auto">{{$profile.name}}</div>
{{if $profile.edit}}
<div class="action">
<a class="icon s16 edit ttright" href="{{$profile.edit.0}}" title="{{$profile.edit.3}}"><span>{{$profile.edit.1}}</span></a>
@ -20,7 +20,7 @@
{{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
{{if $profile.network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$profile.network_link nofilter}}</dd></dl>{{/if}}
{{if $location}}
<dl class="location">
<dl class="location" dir="auto">
<dt class="location-label">{{$location}}</dt>
<dd class="adr h-adr">
{{if $profile.address}}<p class="street-address p-street-address">{{$profile.address nofilter}}</p>{{/if}}
@ -44,7 +44,7 @@
{{if $homepage}}<dl class="homepage"><dt class="homepage-label">{{$homepage}}</dt><dd class="homepage-url"><a href="{{$profile.homepage}}" class="u-url" rel="me" target="_blank" rel="noopener noreferrer">{{$profile.homepage}}</a></dd></dl>{{/if}}
{{if $about}}<dl class="about"><dt class="about-label">{{$about}}</dt><dd class="x-network">{{$profile.about nofilter}}</dd></dl>{{/if}}
{{if $about}}<dl class="about"><dt class="about-label">{{$about}}</dt><dd class="x-network" dir="auto">{{$profile.about nofilter}}</dd></dl>{{/if}}
{{include file="diaspora_vcard.tpl"}}

View File

@ -74,7 +74,7 @@
<div itemprop="description" class="wall-item-content">
{{if $item.title}}<h2><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h2>{{/if}}
<div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body_html nofilter}}</div>
<div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}" dir="auto">{{$item.body_html nofilter}}</div>
</div>
</div>
<div class="wall-item-bottom">