Merge branch 'feature/post-linebreaks' into 'main'

Add linebreaks to outgoing posts.

See merge request edent/activitypub-single-php-file!2
merge-requests/5/head
Terence Eden 2024-02-20 12:25:14 +00:00
commit f1c4bee58a
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -618,6 +618,10 @@ HTML;
}
// Construct HTML breaks from carriage returns and line breaks
$linebreak_patterns = array("\r\n", "\r", "\n"); // Variations of line breaks found in raw text
$content = str_replace($linebreak_patterns, "<br/>", $content);
// Construct the content
$content = "<p>{$content}</p>";