Merge pull request #11629 from annando/issue-11625

Issue 11625: Don't parse the title through Markdown
pull/11641/head
Tobias Diekershoff 2022-06-11 09:14:13 +02:00 zatwierdzone przez GitHub
commit 5bd3f62665
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -608,7 +608,7 @@ class Processor
private static function processContent($activity, $item)
{
if (!empty($activity['mediatype']) && ($activity['mediatype'] == 'text/markdown')) {
$item['title'] = Markdown::toBBCode($activity['name']);
$item['title'] = strip_tags($activity['name']);
$content = Markdown::toBBCode($activity['content']);
} elseif (!empty($activity['mediatype']) && ($activity['mediatype'] == 'text/bbcode')) {
$item['title'] = $activity['name'];
@ -619,6 +619,8 @@ class Processor
$content = HTML::toBBCode($activity['content']);
}
$item['title'] = trim(BBCode::toPlaintext($item['title']));
if (!empty($activity['languages'])) {
$item['language'] = self::processLanguages($activity['languages']);
}