mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:10:11 +00:00
Unified BBCode conversion, improved proxy functionality
This commit is contained in:
parent
81d2d4b70e
commit
8bb33dccd1
22 changed files with 61 additions and 35 deletions
|
@ -118,7 +118,7 @@ class Notify extends BaseEntity
|
|||
public function updateMsgFromPreamble($epreamble)
|
||||
{
|
||||
$this->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $this->link->__toString()]);
|
||||
$this->msg_cache = self::formatMessage($this->name_cache, strip_tags(BBCode::convert($this->msg)));
|
||||
$this->msg_cache = self::formatMessage($this->name_cache, strip_tags(BBCode::convertForUriId(0, $this->msg, BBCode::EXTERNAL)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -134,6 +134,6 @@ class Notify extends BaseEntity
|
|||
*/
|
||||
public static function formatMessage(string $name, string $message): string
|
||||
{
|
||||
return str_replace('{0}', '<span class="contactname">' . strip_tags(BBCode::convert($name)) . '</span>', htmlspecialchars($message));
|
||||
return str_replace('{0}', '<span class="contactname">' . strip_tags(BBCode::convertForUriId(0, $name, BBCode::EXTERNAL)) . '</span>', htmlspecialchars($message));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,8 +163,8 @@ class Introduction extends BaseFactory
|
|||
'contact_id' => $intro['contact-id'],
|
||||
'photo' => Contact::getPhoto($intro),
|
||||
'name' => $intro['name'],
|
||||
'location' => BBCode::convert($intro['location'], false),
|
||||
'about' => BBCode::convert($intro['about'], false),
|
||||
'location' => BBCode::convertForUriId($intro['uri-id'], $intro['location'], BBCode::EXTERNAL),
|
||||
'about' => BBCode::convertForUriId ($intro['uri-id'], $intro['about'], BBCode::EXTERNAL),
|
||||
'keywords' => $intro['keywords'],
|
||||
'hidden' => $intro['hidden'] == 1,
|
||||
'post_newfriend' => (intval($this->pConfig->get($this->session->getLocalUserId(), 'system', 'post_newfriend')) ? '1' : 0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue