Merge pull request #12116 from annando/issue-11846
Issue 11846: Fix client behaviour when following hash tags
This commit is contained in:
commit
b9f0985467
|
@ -1305,7 +1305,7 @@ class BBCode
|
||||||
/**
|
/**
|
||||||
* Callback: Expands links from given $match array
|
* Callback: Expands links from given $match array
|
||||||
*
|
*
|
||||||
* @param arrat $match Array with link match
|
* @param array $match Array with link match
|
||||||
* @return string BBCode
|
* @return string BBCode
|
||||||
*/
|
*/
|
||||||
private static function expandLinksCallback(array $match): string
|
private static function expandLinksCallback(array $match): string
|
||||||
|
@ -1320,7 +1320,7 @@ class BBCode
|
||||||
/**
|
/**
|
||||||
* Callback: Cleans picture links
|
* Callback: Cleans picture links
|
||||||
*
|
*
|
||||||
* @param arrat $match Array with link match
|
* @param array $match Array with link match
|
||||||
* @return string BBCode
|
* @return string BBCode
|
||||||
*/
|
*/
|
||||||
private static function cleanPictureLinksCallback(array $match): string
|
private static function cleanPictureLinksCallback(array $match): string
|
||||||
|
@ -1975,6 +1975,9 @@ class BBCode
|
||||||
$text = preg_replace("/([@!])\[url\=(.*?)\](.*?)\[\/url\]/ism",
|
$text = preg_replace("/([@!])\[url\=(.*?)\](.*?)\[\/url\]/ism",
|
||||||
'<bdi>$1<a href="$2" class="userinfo mention" title="$3">$3</a></bdi>',
|
'<bdi>$1<a href="$2" class="userinfo mention" title="$3">$3</a></bdi>',
|
||||||
$text);
|
$text);
|
||||||
|
$text = preg_replace("/([#])\[url\=(.*?)\](.*?)\[\/url\]/ism",
|
||||||
|
'<a class="mention hashtag status-link" href="$2" rel="tag">$1<span>$3</span></a>',
|
||||||
|
$text);
|
||||||
} else {
|
} else {
|
||||||
$text = preg_replace("/([#@!])\[url\=(.*?)\](.*?)\[\/url\]/ism", '$1$3', $text);
|
$text = preg_replace("/([#@!])\[url\=(.*?)\](.*?)\[\/url\]/ism", '$1$3', $text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ class Status extends BaseDataTransferObject
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sensitive = $sensitive;
|
$this->sensitive = $sensitive;
|
||||||
$this->spoiler_text = $item['title'] ?: $item['content-warning'];
|
$this->spoiler_text = $item['title'] ?: $item['content-warning'] ?: '';
|
||||||
|
|
||||||
$visibility = ['public', 'private', 'unlisted'];
|
$visibility = ['public', 'private', 'unlisted'];
|
||||||
$this->visibility = $visibility[$item['private']];
|
$this->visibility = $visibility[$item['private']];
|
||||||
|
|
Loading…
Reference in a new issue