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

Leading spaces are not being trimed on the Publisher & Identifiers field. #3015

Open
T-prog3 opened this issue Mar 8, 2024 · 3 comments
Open
Labels

Comments

@T-prog3
Copy link

T-prog3 commented Mar 8, 2024

Describe the bug/problem
I did just notice that space characters at the beginning of the Publisher field are not being trimmed when you save. This creates an issue where you can have MyBookPublisher and MyBookPublisher if you don't notice the space yourself.

This issue affects both Identifiers fields as well but here you also have the additional problem of ending spaces not being removed. All other fields works as the should.

@OzzieIsaacs
Copy link
Collaborator

From reading the code I can't see the issue (and also not reproduce for publishers), for identifiers the problem is there

@OzzieIsaacs OzzieIsaacs added the bug label Mar 8, 2024
@T-prog3
Copy link
Author

T-prog3 commented Mar 9, 2024

I got this issue by copy/paste the publisher data from amazon.
img1

In Calibre-Web it becomes this when i paste:
img2

When i save it turns into this:
img3

In this state with a space as first char it can't be found in the Publishers list in the side menu and it will be treated as a different publisher. I can thereby have 100 books of publisher Ecco and lets say 5 "Space"Ecco and they will have 2 separate lists when you click on the publisher name at the books page.

@T-prog3
Copy link
Author

T-prog3 commented Mar 9, 2024

Update:
I did a character lookup of the content when i paste in Calibre-Web and it turns out that it's not just a space but another character as well.

This is the Unicode character content of it:

U+0020 : SPACE [SP]
U+200E : LEFT-TO-RIGHT MARK [LRM]
U+0020 : SPACE [SP]
U+0045 : LATIN CAPITAL LETTER E
U+0063 : LATIN SMALL LETTER C
U+0063 : LATIN SMALL LETTER C
U+006F : LATIN SMALL LETTER O

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

2 participants