Bug 498618

Summary: Spectacle displays found barcode contents with escaped HTML entities
Product: [Applications] Spectacle Reporter: Tobias Leupold <tl>
Component: GeneralAssignee: Noah Davis <noahadvs>
Status: RESOLVED FIXED    
Severity: normal CC: kde, tl
Priority: NOR    
Version First Reported In: 24.12.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Example QR code encoding `Some string with "quotes"`
Spectacle displaying "Some string with &quot;quotes&quot;" as the QR code dataset

Description Tobias Leupold 2025-01-13 18:06:44 UTC
SUMMARY

When taking a screenshot of e.g. a QR code that contains chars that have to be encoded using HTML entities (if used in HTML), those entities are displayed instead of the real data. Copying the data yields the actual data though.


STEPS TO REPRODUCE
Take a screenshot of some barcode containing e.g. a quote (I'll attach an example)

OBSERVED RESULT
The content is displayed HTML-escaped

EXPECTED RESULT
The original content should be displayed

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.1
Comment 1 Tobias Leupold 2025-01-13 18:07:17 UTC
Created attachment 177324 [details]
Example QR code encoding `Some string with "quotes"`
Comment 2 Tobias Leupold 2025-01-13 18:07:50 UTC
Created attachment 177325 [details]
Spectacle displaying "Some string with &quot;quotes&quot;" as the QR code dataset
Comment 3 Bug Janitor Service 2025-01-13 18:33:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/432
Comment 4 Noah Davis 2025-01-13 21:04:11 UTC
Git commit ce6542fec0c6bd5fd4f4c5c4116165474926517e by Noah Davis.
Committed on 13/01/2025 at 18:35.
Pushed by ndavis into branch 'master'.

Force QR code inline message to always be HTML

Without this, some characters will sometimes be shown
in their raw html escaped forms when the internal text
object of Kirigami InlineMessage is detecting plain text.

M  +1    -1    src/Gui/QRCodeScannedMessage.qml

https://invent.kde.org/graphics/spectacle/-/commit/ce6542fec0c6bd5fd4f4c5c4116165474926517e
Comment 5 Noah Davis 2025-01-13 21:04:34 UTC
Git commit 6fdd77148f5356647f63cb0b6fce17b7a2649871 by Noah Davis.
Committed on 13/01/2025 at 21:04.
Pushed by ndavis into branch 'release/24.12'.

Force QR code inline message to always be HTML

Without this, some characters will sometimes be shown
in their raw html escaped forms when the internal text
object of Kirigami InlineMessage is detecting plain text.


(cherry picked from commit ce6542fec0c6bd5fd4f4c5c4116165474926517e)

Co-authored-by: Noah Davis <noahadvs@gmail.com>

M  +1    -1    src/Gui/QRCodeScannedMessage.qml

https://invent.kde.org/graphics/spectacle/-/commit/6fdd77148f5356647f63cb0b6fce17b7a2649871
Comment 6 Noah Davis 2025-01-13 21:04:56 UTC
Git commit 713cd2d57fbac84795cd6678dbac2a38334c8a77 by Noah Davis.
Committed on 13/01/2025 at 21:04.
Pushed by ndavis into branch 'Plasma/6.3'.

Force QR code inline message to always be HTML

Without this, some characters will sometimes be shown
in their raw html escaped forms when the internal text
object of Kirigami InlineMessage is detecting plain text.


(cherry picked from commit ce6542fec0c6bd5fd4f4c5c4116165474926517e)

Co-authored-by: Noah Davis <noahadvs@gmail.com>

M  +1    -1    src/Gui/QRCodeScannedMessage.qml

https://invent.kde.org/graphics/spectacle/-/commit/713cd2d57fbac84795cd6678dbac2a38334c8a77
Comment 7 Tobias Leupold 2025-01-13 21:07:12 UTC
That was fast. Thanks :-)