]> git.mxchange.org Git - friendica.git/commitdiff
[API] Convert user description to plain text
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 27 May 2019 15:58:02 +0000 (11:58 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 27 May 2019 15:58:02 +0000 (11:58 -0400)
include/api.php

index dcd8335e11c991653c747695d299ad9125128460..0fab1f47c164e02a64e944494827ae2c6d8467c5 100644 (file)
@@ -611,7 +611,7 @@ function api_get_user(App $a, $contact_id = null)
                                'name' => $contact["name"],
                                'screen_name' => (($contact['nick']) ? $contact['nick'] : $contact['name']),
                                'location' => ($contact["location"] != "") ? $contact["location"] : ContactSelector::networkToName($contact['network'], $contact['url']),
-                               'description' => $contact["about"],
+                               'description' => HTML::toPlaintext(BBCode::toPlaintext($contact["about"])),
                                'profile_image_url' => $contact["micro"],
                                'profile_image_url_https' => $contact["micro"],
                                'profile_image_url_profile_size' => $contact["thumb"],
@@ -690,7 +690,7 @@ function api_get_user(App $a, $contact_id = null)
                'name' => (($uinfo[0]['name']) ? $uinfo[0]['name'] : $uinfo[0]['nick']),
                'screen_name' => (($uinfo[0]['nick']) ? $uinfo[0]['nick'] : $uinfo[0]['name']),
                'location' => $location,
-               'description' => $description,
+               'description' => HTML::toPlaintext(BBCode::toPlaintext($description)),
                'profile_image_url' => $uinfo[0]['micro'],
                'profile_image_url_https' => $uinfo[0]['micro'],
                'profile_image_url_profile_size' => $uinfo[0]["thumb"],