Merge pull request #6400 from annando/issue-6394

Issue 6394: The contact location has to be BBEncoded
This commit is contained in:
Hypolite Petovan 2019-01-06 16:37:43 -05:00 committed by GitHub
commit 4bf2701912
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 13 additions and 9 deletions

View file

@ -514,6 +514,10 @@ class Profile
$p['address'] = $p['location']; $p['address'] = $p['location'];
} }
if (isset($p['address'])) {
$p['address'] = BBCode::convert($p['address']);
}
if (isset($p['photo'])) { if (isset($p['photo'])) {
$p['photo'] = ProxyUtils::proxifyUrl($p['photo'], false, ProxyUtils::SIZE_SMALL); $p['photo'] = ProxyUtils::proxifyUrl($p['photo'], false, ProxyUtils::SIZE_SMALL);
} }

View file

@ -642,7 +642,7 @@ class Contact extends BaseModule
'$profileurllabel'=> L10n::t('Profile URL'), '$profileurllabel'=> L10n::t('Profile URL'),
'$profileurl' => $contact['url'], '$profileurl' => $contact['url'],
'$account_type' => Model\Contact::getAccountType($contact), '$account_type' => Model\Contact::getAccountType($contact),
'$location' => $contact['location'], '$location' => BBCode::convert($contact['location']),
'$location_label' => L10n::t('Location:'), '$location_label' => L10n::t('Location:'),
'$xmpp' => BBCode::convert($contact['xmpp']), '$xmpp' => BBCode::convert($contact['xmpp']),
'$xmpp_label' => L10n::t('XMPP:'), '$xmpp_label' => L10n::t('XMPP:'),

View file

@ -53,7 +53,7 @@
{{* Some information about the contact from the profile *}} {{* Some information about the contact from the profile *}}
<dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl> <dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl>
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}} {{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location nofilter}}</dd></dl>{{/if}}
{{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}} {{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}}
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}} {{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about nofilter}}</dd></dl>{{/if}} {{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about nofilter}}</dd></dl>{{/if}}

View file

@ -17,7 +17,7 @@
{{if $location}} {{if $location}}
<dl class="location"><dt class="location-label">{{$location}}</dt> <dl class="location"><dt class="location-label">{{$location}}</dt>
<dd class="adr h-adr"> <dd class="adr h-adr">
{{if $profile.address}}<div class="street-address p-street-address">{{$profile.address}}</div>{{/if}} {{if $profile.address}}<div class="street-address p-street-address">{{$profile.address nofilter}}</div>{{/if}}
<span class="city-state-zip"> <span class="city-state-zip">
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}} <span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
<span class="region p-region">{{$profile.region}}</span> <span class="region p-region">{{$profile.region}}</span>

View file

@ -15,7 +15,7 @@
{{if $location}} {{if $location}}
<dl class="location"><dt class="location-label">{{$location}}</dt> <dl class="location"><dt class="location-label">{{$location}}</dt>
<dd class="adr h-adr"> <dd class="adr h-adr">
{{if $profile.address}}<div class="street-address p-street-address">{{$profile.address}}</div>{{/if}} {{if $profile.address}}<div class="street-address p-street-address">{{$profile.address nofilter}}</div>{{/if}}
<span class="city-state-zip"> <span class="city-state-zip">
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}} <span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
<span class="region p-region">{{$profile.region}}</span> <span class="region p-region">{{$profile.region}}</span>

View file

@ -88,7 +88,7 @@
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<hr class="profile-separator"> <hr class="profile-separator">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 text-muted">{{$location_label}}</div> <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 text-muted">{{$location_label}}</div>
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">{{$location}}</div> <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">{{$location nofilter}}</div>
</div> </div>
{{/if}} {{/if}}

View file

@ -76,7 +76,7 @@
<div class="location detail"> <div class="location detail">
<span class="location-label icon"><i class="fa fa-map-marker"></i></span> <span class="location-label icon"><i class="fa fa-map-marker"></i></span>
<span class="adr"> <span class="adr">
{{if $profile.address}}<span class="street-address p-street-address">{{$profile.address}}</span>{{/if}} {{if $profile.address}}<span class="street-address p-street-address">{{$profile.address nofilter}}</span>{{/if}}
<span class="city-state-zip"> <span class="city-state-zip">
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}} <span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
<span class="region p-region">{{$profile.region}}</span> <span class="region p-region">{{$profile.region}}</span>

View file

@ -38,7 +38,7 @@
{{if $location}} {{if $location}}
<dl class="location"><dt class="location-label">{{$location}}</dt> <dl class="location"><dt class="location-label">{{$location}}</dt>
<dd class="adr h-adr"> <dd class="adr h-adr">
{{if $profile.address}}<div class="street-address p-street-address">{{$profile.address}}</div>{{/if}} {{if $profile.address}}<div class="street-address p-street-address">{{$profile.address nofilter}}</div>{{/if}}
<span class="city-state-zip"> <span class="city-state-zip">
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}} <span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
<span class="region p-region">{{$profile.region}}</span> <span class="region p-region">{{$profile.region}}</span>

View file

@ -54,7 +54,7 @@
{{* Some information about the contact from the profile *}} {{* Some information about the contact from the profile *}}
<dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl> <dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl>
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}} {{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location nofilter}}</dd></dl>{{/if}}
{{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}} {{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}}
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}} {{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about nofilter}}</dd></dl>{{/if}} {{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about nofilter}}</dd></dl>{{/if}}

View file

@ -28,7 +28,7 @@
{{if $location}} {{if $location}}
<dl class="location"><dt class="location-label">{{$location}}</dt> <dl class="location"><dt class="location-label">{{$location}}</dt>
<dd class="adr h-adr"> <dd class="adr h-adr">
{{if $profile.address}}<div class="street-address p-street-address">{{$profile.address}}</div>{{/if}} {{if $profile.address}}<div class="street-address p-street-address">{{$profile.address nofilter}}</div>{{/if}}
<span class="city-state-zip"> <span class="city-state-zip">
<span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}} <span class="locality p-locality">{{$profile.locality}}</span>{{if $profile.locality}}, {{/if}}
<span class="region p-region">{{$profile.region}}</span> <span class="region p-region">{{$profile.region}}</span>