mirror of
https://github.com/friendica/friendica
synced 2024-12-23 14:00:15 +00:00
Merge pull request #10456 from annando/issue-10454
Quickfix for hashtags in author names in shared posts
This commit is contained in:
commit
a0772c91d0
1 changed files with 4 additions and 0 deletions
|
@ -953,6 +953,10 @@ class BBCode
|
||||||
*/
|
*/
|
||||||
public static function fetchShareAttributes($text)
|
public static function fetchShareAttributes($text)
|
||||||
{
|
{
|
||||||
|
// See Issue https://github.com/friendica/friendica/issues/10454
|
||||||
|
// Hashtags in usernames are expanded to links. This here is a quick fix.
|
||||||
|
$text = preg_replace('/([@!#])\[url\=.*?\](.*?)\[\/url\]/ism', '$1$2', $text);
|
||||||
|
|
||||||
$attributes = [];
|
$attributes = [];
|
||||||
if (!preg_match("/(.*?)\[share(.*?)\](.*)\[\/share\]/ism", $text, $matches)) {
|
if (!preg_match("/(.*?)\[share(.*?)\](.*)\[\/share\]/ism", $text, $matches)) {
|
||||||
return $attributes;
|
return $attributes;
|
||||||
|
|
Loading…
Reference in a new issue