Skip to content
New issue

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

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

Already on GitHub? # to your account

[Post edit] BBCode Is not retained when editing #639

Closed
AkesiSeli opened this issue Dec 14, 2024 · 1 comment · Fixed by #642
Closed

[Post edit] BBCode Is not retained when editing #639

AkesiSeli opened this issue Dec 14, 2024 · 1 comment · Fixed by #642
Labels
bug Something isn't working

Comments

@AkesiSeli
Copy link
Collaborator

AkesiSeli commented Dec 14, 2024

Some elements of the original markup (e.g. headlines and quotations) are not retained when editing a post and must be re-inserted manually.

Even newlines under some circumstances appear to be lost.


Source: report on Friendica

@AkesiSeli AkesiSeli added the bug Something isn't working label Dec 15, 2024
@AkesiSeli AkesiSeli linked a pull request Dec 15, 2024 that will close this issue
@AkesiSeli
Copy link
Collaborator Author

I've found the cause of this issue, with BBCode posts:

  • the "source" I get from the backend with the GET v1/statuses/:id/source does not retain any markup so it cannot be used
  • the post content has HTML syntax, which is not what users want

The only solution was to attempt to "reconstruct" the original BBCode from the HTML, client-side and by hand. Which is not ideal at all.

The current implementation was not completed and missed some cases, which have been added in #642. This is a tentative fix and should be improved and refined further, though.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant