Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Line breaks not showing correctly #1054

Open
zisra opened this issue Dec 20, 2022 · 1 comment
Open

[Bug]: Line breaks not showing correctly #1054

zisra opened this issue Dec 20, 2022 · 1 comment
Assignees
Labels

Comments

@zisra
Copy link

zisra commented Dec 20, 2022

Relevant scope

Frontend specs

Description

As you can see in this article for example: https://demo.realworld.io/#/article/Try-to-transmit-the-HTTP-card-maybe-it-will-override-the-multi-byte-hard-drive!-120863
Line breaks are shown as "\n" instead of an HTML line break: <br />
Screenshot 2022-12-20 at 9 09 48 AM

@adql
Copy link

adql commented Feb 6, 2023

The line breaks are wrongly represented in the response body as \\n, i.e. the \ is escaped.

However, this appears to be a problem with how the dummy articles were entered into the database rather than with the implementation itself. If you create a new article the breaks are represented correctly, as can be seen here as well as in the response body (note that the front-end ignores single line breaks completely, only a \n\n is regarded as a new paragraph).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants