-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Label Generator is encoding the URL as a note, not a URL #564
Comments
+1 I'm seeing this same behavior on the demo site along with my self hosted version. Both the label generator page as well as the qr codes being generated on individual item/asset pages are not encoded correctly. |
+1 I have the same problem on my side. The same problem happens in the Location QR-codes. |
Same here! Anyone knows a quick fix? |
I'm happy to take a look at the code, but my biggest problem is always finding where in the code the thing is generated, specifically, what module generates the QR code? If someone can point me to it, I'm happy to take a crack at a PR; else, I just don't have the time to dig through all of the code. |
I see backend/app/api/handlers/v1/v1_ctrl_qrcode.go imports go-qrcode from this git repo: |
It appears that the issue is caused by the https://homebox.fly.dev/api/v1/qrcode?data=https%253A%252F%252Fhomebox.fly.dev%252Fa%252F000-001 Decoding the data parameter once gives: https://homebox.fly.dev/api/v1/qrcode?data=https%3A%2F%2Fhomebox.fly.dev%2Fa%2F000-001 Scanning the latter works fine. From a cursory glance at the frontend code, the issue appears to be in 2 places (label and item pages):
The data property probably shouldn't be URL-encoded here, as that is already handled in the homebox/frontend/lib/api/base/urls.ts Lines 22 to 36 in 0995478
Using const url = new URL("https://homebox.fly.dev/api/v1/qrcode");
url.searchParams.append("data", "https://homebox.fly.dev/a/000-001");
console.log(url.toString()); // https://homebox.fly.dev/api/v1/qrcode?data=https%3A%2F%2Fhomebox.fly.dev%2Fa%2F000-001 |
same problem here, hope to see it solved in the next version ❤️ |
First Check
Homebox Version
https://homebox.fly.dev/reports/label-generator
What is the issue you are experiencing?
On my phone (samsung s23) it tries to open the URL's on that page as https%3A%2F%2Ftest.com%2Fa%2F000-001 so clearly something is wrong with encoding here.
How can the maintainer reproduce the issue?
Go to the demo site, open https://homebox.fly.dev/reports/label-generator, scan a QR code.
Deployment
Other
Deployment Details
No response
The text was updated successfully, but these errors were encountered: