aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar FireFingers21 <online+github@alexhuisman.ca> 2023-11-13 11:20:14 -0800
committerGravatar GitHub <noreply@github.com> 2023-11-13 20:20:14 +0100
commitb1d568697ad031a42b478ea6a3316558deaaa7c3 (patch)
treed10c0f40b8b7647c4630913859e76e0df46342a2
parent2b8b80a5a92c4c464c4cc3f67affed8526cdad18 (diff)
Fix newlines not always displaying properly in description (#5859)
* Fix newlines not displaying properly * Add name to credits * Restore enclosure-description class Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> * Update app/Models/Entry.php XHTML --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
-rw-r--r--CREDITS.md1
-rw-r--r--app/Models/Entry.php2
-rw-r--r--p/themes/base-theme/frss.css4
-rw-r--r--p/themes/base-theme/frss.rtl.css4
4 files changed, 2 insertions, 9 deletions
diff --git a/CREDITS.md b/CREDITS.md
index 7f33ed989..ac8ddbf7b 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -71,6 +71,7 @@ People are sorted by name so please keep this order.
* [fabianski7](https://github.com/fabianski7): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:fabianski7)
* [Fake4d](https://github.com/Fake4d): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Fake4d)
* [Felix2yu 石渠清心](https://github.com/Felix2yu): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Felix2yu), [Web](https://yufei.im/)
+* [FireFingers21](https://github.com/firefingers21): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:firefingers21)
* [flo0627](https://github.com/flo0627): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:flo0627)
* [Frans de Jonge](https://github.com/Frenzie): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:Frenzie), [Web](http://fransdejonge.com/)
* [FromTheMoon85](https://github.com/FromTheMoon85): [contributions](https://github.com/FreshRSS/FreshRSS/pulls?q=is:pr+author:FromTheMoon85)
diff --git a/app/Models/Entry.php b/app/Models/Entry.php
index 3e9cee4e2..249f607ee 100644
--- a/app/Models/Entry.php
+++ b/app/Models/Entry.php
@@ -185,7 +185,7 @@ HTML;
continue;
}
$credit = $enclosure['credit'] ?? '';
- $description = $enclosure['description'] ?? '';
+ $description = nl2br($enclosure['description'] ?? '', true);
$length = $enclosure['length'] ?? 0;
$medium = $enclosure['medium'] ?? '';
$mime = $enclosure['type'] ?? '';
diff --git a/p/themes/base-theme/frss.css b/p/themes/base-theme/frss.css
index 219a78dce..b9c296b76 100644
--- a/p/themes/base-theme/frss.css
+++ b/p/themes/base-theme/frss.css
@@ -2096,10 +2096,6 @@ html.slider-active {
margin-left: .8em;
}
-.enclosure-description {
- white-space: pre-line;
-}
-
.default-user {
font-style: italic;
}
diff --git a/p/themes/base-theme/frss.rtl.css b/p/themes/base-theme/frss.rtl.css
index 3bb38e88b..62c36691a 100644
--- a/p/themes/base-theme/frss.rtl.css
+++ b/p/themes/base-theme/frss.rtl.css
@@ -2096,10 +2096,6 @@ html.slider-active {
margin-right: .8em;
}
-.enclosure-description {
- white-space: pre-line;
-}
-
.default-user {
font-style: italic;
}