LibriVox / librivox-catalog

LibriVox catalog and reader workflow application
https://librivox.org
MIT License
36 stars 17 forks source link

Render newlines in Project page description #189

Closed garethsime closed 4 months ago

garethsime commented 4 months ago

This PR is an attempt to address issue #188.

For a while, newlines in Project descriptions weren't being rendered properly in the catalog HTML, so people put manual <br /> tags into them.

Now, we want to render the newlines as they are in the admin screens, but that could cause extra unintended whitespace for projects that already have manual <br /> tags in them, so we normalize all of the different kinds of "newline" and strip some out if there are too many in a row.

(If this works as intended, then we can apply the same thing to the author pages as well.)