Skip to content

Conversation

@AIlkiv
Copy link
Collaborator

@AIlkiv AIlkiv commented Nov 23, 2025

Before:

before.mp4

After:

after.mp4

Signed-off-by: ailkiv <a.ilkiv.ye@gmail.com>
@AIlkiv AIlkiv requested a review from Chartman123 November 23, 2025 14:30
@Chartman123
Copy link
Collaborator

@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?

@susnux
Copy link
Collaborator

susnux commented Nov 24, 2025

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!

@Chartman123
Copy link
Collaborator

Chartman123 commented Nov 24, 2025

@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?

@AIlkiv
Copy link
Collaborator Author

AIlkiv commented Nov 25, 2025

@Chartman123 If I do this on the backend when saving, will it be okay?

Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
@Chartman123
Copy link
Collaborator

@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.

@AIlkiv
Copy link
Collaborator Author

AIlkiv commented Dec 5, 2025

@Chartman123 Thank you, I understand. I will try to finish it according to your comment.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants