fix: transfer ownership confirmation string formatting
Before:
https://github.com/user-attachments/assets/19fcddf9-1d82-4cb9-a364-f20cd0832f49
After:
https://github.com/user-attachments/assets/16f951c7-b932-40ab-afbe-fa88f509508e
@AIlkiv nice catch. But I'm wondering if we shouldn't disallow line breaks in the title in the first place (they should then be cleaned up in the backend, too)
@susnux what do you think?
But I'm wondering if we shouldn't disallow line breaks in the title in the first place (they should then be cleaned up in the backend, too)
Agree!
@AIlkiv could you please add the changes to disallow line breaks (and possibly tabs) in the title to the front and backend?
What about existing titles in the database? should we add a migration, too?
@Chartman123 If I do this on the backend when saving, will it be okay?
@AIlkiv I've added an event handler to the title to prevent adding new lines, but I think that we should also adjust onTitleChange to handle copy/paste actions that already include line breaks.
If we just sanitize the string on saving in the backend the user might wonder why the title looks different after saving the form. Instead the API could throw an error if the title contains unwanted characters.
@Chartman123 Thank you, I understand. I will try to finish it according to your comment.
Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.
We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.
Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6
Thank you for contributing to Nextcloud and we hope to hear from you soon!
(If you believe you should not receive this message, you can add yourself to the blocklist.)