wkaisertexas / tiktok-uploader

Automatically ⬆️ upload TikTok videos
https://pypi.org/project/tiktok-uploader/
360 stars 84 forks source link

Adding newline or unicode characters to description does some funky stuff #51

Closed benobytes closed 11 months ago

benobytes commented 1 year ago

I accidentally forgot to clean my input and a the input contained a couple '\n'. I watched the browser (firefox) as when it approached the typing of the new line character it moved the cursor back to the beginning of the description about 3 characters in, producing an output description like this:

Check out this cool recipe!\n#cooking #cook #cookingusa

Che#cooking #cook #cookingusack out this cool recipe!

Managed to fix it by just removing the newline and other weird characters. Maybe do that by default?

wkaisertexas commented 11 months ago

I think that sanitizing inputs should be on the user's responsibility. Writing your own string sanitizer is not too hard and I really do not want to maintain a string sanitizer.

Additionally, TikTok already allows users to set multi-line descriptions through their mobile app. With TikTok's move to Creator Center it is plausible that this feature will move to the desktop.

Adding a caveat in the README.md probably a good idea though.