From 7e19506435d2c937908a675a6845a1bc4b0d7c7a Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 6 Jan 2019 21:04:10 +0000 Subject: [PATCH] Issue 6394: The contact location has to be BBEncoded --- src/Model/Profile.php | 4 ++++ src/Module/Contact.php | 2 +- view/templates/contact_edit.tpl | 2 +- view/templates/profile_vcard.tpl | 2 +- view/theme/duepuntozero/templates/profile_vcard.tpl | 2 +- view/theme/frio/templates/contact_edit.tpl | 2 +- view/theme/frio/templates/profile_vcard.tpl | 2 +- view/theme/quattro/templates/profile_vcard.tpl | 2 +- view/theme/vier/templates/contact_edit.tpl | 2 +- view/theme/vier/templates/profile_vcard.tpl | 2 +- 10 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index bd455bc6ba..39765e74ef 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -514,6 +514,10 @@ class Profile $p['address'] = $p['location']; } + if (isset($p['address'])) { + $p['address'] = BBCode::convert($p['address']); + } + if (isset($p['photo'])) { $p['photo'] = ProxyUtils::proxifyUrl($p['photo'], false, ProxyUtils::SIZE_SMALL); } diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 410f5878bb..06c6ee2417 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -642,7 +642,7 @@ class Contact extends BaseModule '$profileurllabel'=> L10n::t('Profile URL'), '$profileurl' => $contact['url'], '$account_type' => Model\Contact::getAccountType($contact), - '$location' => $contact['location'], + '$location' => BBCode::convert($contact['location']), '$location_label' => L10n::t('Location:'), '$xmpp' => BBCode::convert($contact['xmpp']), '$xmpp_label' => L10n::t('XMPP:'), diff --git a/view/templates/contact_edit.tpl b/view/templates/contact_edit.tpl index 6f63dde2b6..644121cadd 100644 --- a/view/templates/contact_edit.tpl +++ b/view/templates/contact_edit.tpl @@ -53,7 +53,7 @@ {{* Some information about the contact from the profile *}}
{{$profileurllabel}}
{{$profileurl}}
- {{if $location}}
{{$location_label}}
{{$location}}
{{/if}} + {{if $location}}
{{$location_label}}
{{$location nofilter}}
{{/if}} {{if $xmpp}}
{{$xmpp_label}}
{{$xmpp}}
{{/if}} {{if $keywords}}
{{$keywords_label}}
{{$keywords}}
{{/if}} {{if $about}}
{{$about_label}}
{{$about nofilter}}
{{/if}} diff --git a/view/templates/profile_vcard.tpl b/view/templates/profile_vcard.tpl index 124fca154f..192c860de8 100644 --- a/view/templates/profile_vcard.tpl +++ b/view/templates/profile_vcard.tpl @@ -17,7 +17,7 @@ {{if $location}}
{{$location}}
- {{if $profile.address}}
{{$profile.address}}
{{/if}} + {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} {{$profile.locality}}{{if $profile.locality}}, {{/if}} {{$profile.region}} diff --git a/view/theme/duepuntozero/templates/profile_vcard.tpl b/view/theme/duepuntozero/templates/profile_vcard.tpl index a7d0a0bc5a..d80b8feed2 100644 --- a/view/theme/duepuntozero/templates/profile_vcard.tpl +++ b/view/theme/duepuntozero/templates/profile_vcard.tpl @@ -15,7 +15,7 @@ {{if $location}}
{{$location}}
- {{if $profile.address}}
{{$profile.address}}
{{/if}} + {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} {{$profile.locality}}{{if $profile.locality}}, {{/if}} {{$profile.region}} diff --git a/view/theme/frio/templates/contact_edit.tpl b/view/theme/frio/templates/contact_edit.tpl index 70ebdcd0c8..92ff615a98 100644 --- a/view/theme/frio/templates/contact_edit.tpl +++ b/view/theme/frio/templates/contact_edit.tpl @@ -88,7 +88,7 @@

{{$location_label}}
-
{{$location}}
+
{{$location nofilter}}
{{/if}} diff --git a/view/theme/frio/templates/profile_vcard.tpl b/view/theme/frio/templates/profile_vcard.tpl index 0649f8a551..462fb35677 100644 --- a/view/theme/frio/templates/profile_vcard.tpl +++ b/view/theme/frio/templates/profile_vcard.tpl @@ -76,7 +76,7 @@
- {{if $profile.address}}{{$profile.address}}{{/if}} + {{if $profile.address}}{{$profile.address nofilter}}{{/if}} {{$profile.locality}}{{if $profile.locality}}, {{/if}} {{$profile.region}} diff --git a/view/theme/quattro/templates/profile_vcard.tpl b/view/theme/quattro/templates/profile_vcard.tpl index 68028fe91e..927047cd33 100644 --- a/view/theme/quattro/templates/profile_vcard.tpl +++ b/view/theme/quattro/templates/profile_vcard.tpl @@ -38,7 +38,7 @@ {{if $location}}
{{$location}}
- {{if $profile.address}}
{{$profile.address}}
{{/if}} + {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} {{$profile.locality}}{{if $profile.locality}}, {{/if}} {{$profile.region}} diff --git a/view/theme/vier/templates/contact_edit.tpl b/view/theme/vier/templates/contact_edit.tpl index 8fbbbfc380..a01fac9ee4 100644 --- a/view/theme/vier/templates/contact_edit.tpl +++ b/view/theme/vier/templates/contact_edit.tpl @@ -54,7 +54,7 @@ {{* Some information about the contact from the profile *}}
{{$profileurllabel}}
{{$profileurl}}
- {{if $location}}
{{$location_label}}
{{$location}}
{{/if}} + {{if $location}}
{{$location_label}}
{{$location nofilter}}
{{/if}} {{if $xmpp}}
{{$xmpp_label}}
{{$xmpp}}
{{/if}} {{if $keywords}}
{{$keywords_label}}
{{$keywords}}
{{/if}} {{if $about}}
{{$about_label}}
{{$about nofilter}}
{{/if}} diff --git a/view/theme/vier/templates/profile_vcard.tpl b/view/theme/vier/templates/profile_vcard.tpl index b37f5d2591..70bc13e82b 100644 --- a/view/theme/vier/templates/profile_vcard.tpl +++ b/view/theme/vier/templates/profile_vcard.tpl @@ -28,7 +28,7 @@ {{if $location}}
{{$location}}
- {{if $profile.address}}
{{$profile.address}}
{{/if}} + {{if $profile.address}}
{{$profile.address nofilter}}
{{/if}} {{$profile.locality}}{{if $profile.locality}}, {{/if}} {{$profile.region}}