Line break (\n) support when using API #2045

Closed
opened 2026-03-22 13:52:50 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @chark1es on GitHub (Dec 6, 2024).

Description

When using the API to create a task, specifically for the "description" field, there is no way to make a line break with \n. When trying to include \n in the description field, it gets parsed out from the html.

Vikunja Version

v0.24.5

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

Originally created by @chark1es on GitHub (Dec 6, 2024). ### Description When using the API to create a task, specifically for the "description" field, there is no way to make a line break with \n. When trying to include \n in the description field, it gets parsed out from the html. ### Vikunja Version v0.24.5 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
Author
Owner

@kolaente commented on GitHub (Dec 6, 2024):

What exactly is the expected behaviour here? Since the frontend renders the description as html, it will not count \n as a line break. If you want the frontend to show a line break, you need to set a <br/> via the api.

@kolaente commented on GitHub (Dec 6, 2024): What exactly is the expected behaviour here? Since the frontend renders the description as html, it will not count `\n` as a line break. If you want the frontend to show a line break, you need to set a `<br/>` via the api.
Author
Owner

@chark1es commented on GitHub (Dec 6, 2024):

Oh I see. I didnt know that I would be able to do that with html.

@chark1es commented on GitHub (Dec 6, 2024): Oh I see. I didnt know that I would be able to do that with html.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#2045