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

Ksoup does not extract correct string #19

Closed
mipastgt opened this issue Dec 11, 2023 · 5 comments
Closed

Ksoup does not extract correct string #19

mipastgt opened this issue Dec 11, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@mipastgt
Copy link

Describe the bug
I am trying to extract some Base64 encoded data from a HTML page but Ksoup is not giving me the original, correct string. For some reason it seems to sometimes duplicate the last few characters of the string which then leads to errors when I try to decode that string. The same code and data work flawlessly with Jsoup. I have attached a test case and a sample HTML file where this error occurs.

To Reproduce
See attached test case.

Expected behavior
The original string from the HTML page should be extracted.

Archiv.zip

@itboy87
Copy link
Collaborator

itboy87 commented Dec 12, 2023

Hi @mipastgt , can you tell me what the value of the PNG_BASE64_HEADER constant is? is that data:image/png;base64,?

@mipastgt
Copy link
Author

Oh yes, I have forgotten to paste that into the code. It is
internal val PNG_BASE64_HEADER = "data:image/png;base64,"

@itboy87
Copy link
Collaborator

itboy87 commented Dec 12, 2023

@mipastgt Thanks, the issue has been reproduced. I will check it and fix it as soon as possible.

@itboy87 itboy87 added the bug Something isn't working label Dec 12, 2023
@itboy87 itboy87 mentioned this issue Dec 18, 2023
@itboy87
Copy link
Collaborator

itboy87 commented Dec 19, 2023

@mipastgt, I have fixed this issue in the latest version (0.1.1). Please try it. Thanks for bringing this issue to our attention.

@mipastgt
Copy link
Author

Thanks a lot. All tests are green now and the application is working too with the fix :-)

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

No branches or pull requests

2 participants