Input text-box for Bio ignores all the new line characters #1643

Closed
opened 2020-03-21 12:56:11 +00:00 by NaiJi · 5 comments
Member

Every time you go to profile settings, the input box for Bio receives the text without new line characters. Some say the same problems happen on the registration page.

9c462e6b212bb6b035e131feef0c9c6f6932e4c9dca1b66da92e08beafe7efb41e2512065b10e41c74f39cf516b7689e8152e558dcb28f774b154a365532961e

Every time you go to profile settings, the input box for Bio receives the text without new line characters. Some say the same problems happen on the registration page. ![9c462e6b212bb6b035e131feef0c9c6f6932e4c9dca1b66da92e08beafe7efb4](/attachments/1203bbb1-b1e7-47e2-8aea-078abef62ff4)![1e2512065b10e41c74f39cf516b7689e8152e558dcb28f774b154a365532961e](/attachments/6ab4b508-709b-42e2-889b-81f459dba9eb)
Owner

Maybe could be a pleroma-fe issue? ping @hj @shpuld

Maybe could be a pleroma-fe issue? ping @hj @shpuld
Member

Pleroma-BE issue. Instead of storing the raw text user submitted we just remove all tags from the HTML bio, which ruins the newlines because of #5582

Pleroma-BE issue. Instead of storing the raw text user submitted we just remove all tags from the HTML bio, which ruins the newlines because of #5582
Owner

Oof. Need moar unit tests.

Oof. Need moar unit tests.
Owner

Should actually be unchanged.

PleromaFE should be using source.note, right? It has Pleroma.HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n")) which in a more readable way is (user.bio || "") |> String.replace("<br>", "\n") |> Pleroma.HTML.strip_tags().

Should actually be unchanged. PleromaFE should be using `source.note`, right? It has ``Pleroma.HTML.strip_tags((user.bio || "") |> String.replace("<br>", "\n"))`` which in a more readable way is ``(user.bio || "") |> String.replace("<br>", "\n") |> Pleroma.HTML.strip_tags()``.
Owner

Oooh great, thanks HTML for the lack of canonical format. <br> != <br/>

Oooh great, thanks HTML for the lack of canonical format. `<br>` != `<br/>`
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma/pleroma#1643
No description provided.