]> git.mxchange.org Git - friendica.git/commitdiff
Remove profile about field double HTML escaping
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 12 Feb 2020 02:38:42 +0000 (21:38 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 12 Feb 2020 02:38:42 +0000 (21:38 -0500)
- Add BBcode conversion for profile.about in widget/vcard.tpl

mod/cal.php
mod/common.php
mod/photos.php
mod/videos.php
view/templates/profile/vcard.tpl
view/templates/widget/vcard.tpl
view/theme/duepuntozero/templates/profile/vcard.tpl
view/theme/frio/templates/profile/vcard.tpl
view/theme/frio/templates/widget/vcard.tpl
view/theme/quattro/templates/profile/vcard.tpl
view/theme/vier/templates/profile/vcard.tpl

index 8352917784f362cb308aa81593655b6009db4386..5903ea63fa90e503ddd0c4b9d01aa8c8472c4996 100644 (file)
@@ -10,6 +10,7 @@
 use Friendica\App;
 use Friendica\Content\Feature;
 use Friendica\Content\Nav;
+use Friendica\Content\Text\BBCode;
 use Friendica\Content\Widget;
 use Friendica\Core\Renderer;
 use Friendica\Core\Session;
@@ -54,14 +55,14 @@ function cal_init(App $a)
 
        $account_type = Contact::getAccountType($profile);
 
-       $tpl = Renderer::getMarkupTemplate("widget/vcard.tpl");
+       $tpl = Renderer::getMarkupTemplate('widget/vcard.tpl');
 
        $vcard_widget = Renderer::replaceMacros($tpl, [
                '$name' => $profile['name'],
                '$photo' => $profile['photo'],
                '$addr' => $profile['addr'] ?: '',
                '$account_type' => $account_type,
-               '$about' => $profile['about'] ?: '',
+               '$about' => BBCode::convert($profile['about'] ?: ''),
        ]);
 
        $cal_widget = Widget\CalendarExport::getHTML();
index 7e1dcc1859f3da99c3cd99e16e1b97482f8fa35f..8ab8434cf5c8873baaedc2c141539d9e6db31946 100644 (file)
@@ -47,7 +47,7 @@ function common_content(App $a)
                $contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]);
 
                if (DBA::isResult($contact)) {
-                       $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate("widget/vcard.tpl"), [
+                       $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/vcard.tpl'), [
                                '$name'  => $contact['name'],
                                '$photo' => $contact['photo'],
                                'url'    => 'contact/' . $cid
index 13fa855c91249596523ed049ffc1525dafb15014..724859733b5da1dedd585e109740ef77922ffb43 100644 (file)
@@ -58,14 +58,14 @@ function photos_init(App $a) {
 
                $account_type = Contact::getAccountType($profile);
 
-               $tpl = Renderer::getMarkupTemplate("widget/vcard.tpl");
+               $tpl = Renderer::getMarkupTemplate('widget/vcard.tpl');
 
                $vcard_widget = Renderer::replaceMacros($tpl, [
                        '$name' => $profile['name'],
                        '$photo' => $profile['photo'],
                        '$addr' => $profile['addr'] ?? '',
                        '$account_type' => $account_type,
-                       '$about' => $profile['about'] ?? '',
+                       '$about' => BBCode::convert($profile['about'] ?? ''),
                ]);
 
                $albums = Photo::getAlbums($a->data['user']['uid']);
index b8119a6861a5543c7946d6b0302caf95f3358eef..7cc544c1c3423a1e33edc5f7ec9458dd81740ebb 100644 (file)
@@ -6,6 +6,7 @@
 use Friendica\App;
 use Friendica\Content\Nav;
 use Friendica\Content\Pager;
+use Friendica\Content\Text\BBCode;
 use Friendica\Core\Renderer;
 use Friendica\Core\Session;
 use Friendica\Database\DBA;
@@ -43,14 +44,14 @@ function videos_init(App $a)
 
                $account_type = Contact::getAccountType($profile);
 
-               $tpl = Renderer::getMarkupTemplate("widget/vcard.tpl");
+               $tpl = Renderer::getMarkupTemplate('widget/vcard.tpl');
 
                $vcard_widget = Renderer::replaceMacros($tpl, [
                        '$name' => $profile['name'],
                        '$photo' => $profile['photo'],
                        '$addr' => $profile['addr'] ?? '',
                        '$account_type' => $account_type,
-                       '$about' => $profile['about'] ?? '',
+                       '$about' => BBCode::convert($profile['about'] ?? ''),
                ]);
 
                // If not there, create 'aside' empty
index b8fc807faeae4b415ebb419eabb4ab0002025532..2b11bc4a3088bcab3ceab6dc7c1328a0baf87d43 100644 (file)
@@ -5,7 +5,7 @@
        
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
        
-       {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
+       {{if $profile.about}}<div class="title">{{$profile.about nofilter}}</div>{{/if}}
 
        {{if $profile.picdate}}
                <div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div>
index 135d90a61b10d970216cd8245e48a0799d272d12..1bd0690a27dd5ec792e1b678e0a6e1037b4443e7 100644 (file)
@@ -2,7 +2,7 @@
 <div class="vcard h-card">
        <div class="fn p-name">{{$name}}</div>
        {{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}}
-       {{if $about}}<div class="title p-job-title">{{$about}}</div>{{/if}}
+       {{if $about}}<div class="title p-job-title">{{$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}}
index 02187d95494a5e6ef7327771b3301b9c4b0feb9b..793b82386f47374504aa553e8527bcfd3b91b9c4 100644 (file)
@@ -5,7 +5,7 @@
        
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
        
-       {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
+       {{if $profile.about}}<div class="title">{{$profile.about nofilter}}</div>{{/if}}
        <div id="profile-photo-wrapper"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
index 2765dbc39e72976113deea598973bd57ee2c2f07..4f7683dc0193732f22a293e2ce6fec0336818669 100644 (file)
@@ -41,7 +41,7 @@
 
                        {{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}}</div>{{/if}}
+                       {{if $profile.about}}<div class="title">{{$profile.about nofilter}}</div>{{/if}}
 
                        {{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}}
                </div>
index fa65de0dc6d666b6725ad33124ae916635b093a5..210edbe4412f056c17fe3b2561187c348f726928 100644 (file)
@@ -30,7 +30,7 @@
 
                        {{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}}
 
-                       {{if $about}}<div class="title">{{$about}}</div>{{/if}}
+                       {{if $about}}<div class="title">{{$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>
index 6f9e5cffbe18c2dc07c934b5a21fcd3a97e0421d..107e7850f0d8367d5a40af51d37ba961200397d2 100644 (file)
@@ -17,7 +17,7 @@
 
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
 
-       {{if $about}}<div class="title">{{$profile.about}}</div>{{/if}}
+       {{if $about}}<div class="title">{{$profile.about nofilter}}</div>{{/if}}
        <div id="profile-photo-wrapper"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}" /></div>
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
index 940bdd016b02151325293b10a40466df19de3ad5..d6cf873b438f8d35154eb21f67c68f07c05a1788 100644 (file)
@@ -11,7 +11,7 @@
 
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
 
-       {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
+       {{if $profile.about}}<div class="title">{{$profile.about nofilter}}</div>{{/if}}
 
        {{if $profile.picdate}}
                <div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div>