http://bugs.winehq.org/show_bug.cgi?id=58287
Bug ID: 58287 Summary: Not all quick responses work when reviewing test results Product: WineHQ Apps Database Version: unspecified Hardware: x86-64 URL: https://appdb.winehq.org/objectManager.php OS: Linux Status: NEW Keywords: download, source Severity: minor Priority: P2 Component: appdb-unknown Assignee: wine-bugs@winehq.org Reporter: imwellcushtymelike@gmail.com Distribution: Ubuntu
Created attachment 78636 --> http://bugs.winehq.org/attachment.cgi?id=78636 Screenshot
For example, one of the quick responses when reviewing a test result doesn't paste anything into the text box:
Please don't use: "Everything...", "All works", etc. in test submissions. Please detail what works and what doesn't work.
See: http://wiki.winehq.org/AppDB_Test_Results_Guidelines
http://bugs.winehq.org/show_bug.cgi?id=58287
--- Comment #1 from Ken Sharp imwellcushtymelike@gmail.com --- I should add... they all used to work.
http://bugs.winehq.org/show_bug.cgi?id=58287
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Not all quick responses |Common Replies cannot |work when reviewing test |handle ASCII apostrophes |results |(')
--- Comment #2 from Ken Sharp imwellcushtymelike@gmail.com --- I have gone through the common replies and changed all the ASCII/typewriter apostrophes (' Unicode 27) to "right single quotation mark" (’ Unicode 2019). This works around but does not fix this bug.
<snip>[3] https://gitlab.winehq.org/winehq/appdb/-/blob/master/include/objectManager.p...
htmlspecialchars() is supposed to handle this [1], but it isn't. It defaults to ENT_HTML401, but the resulting HTML suggests the target is HTML5. There's no way I can test this locally other than this one line.
If htmlspecialchars($sReply,ENT_QUOTES|ENT_SUBSTITUTE|ENT_HTML5) is set then I don't see a reason to use addcslashes() [2] - its use here compared to its syntax doesn't make any sense. It is trying to add slashes to "'\r\n" ? After htmlspecialchars() there should be nothing left to escape.
I'm not sure if the \r\n is needed. Is this for the e-mail? I also don't know why there is a .
I tried to fork the AppDB code in Gitlab but it wouldn't let me, so I'll just attach a patch here which I can't properly test. I also haven't looked very deep into this to see if it will affect the e-mail sent to the user, though I don't think adding \r\n and then converting it back to <br> is needed here.
[1] https://www.php.net/manual/en/function.htmlspecialchars.php [2] https://www.php.net/manual/en/function.addcslashes.php [3] Had to snip code or I'm blocked by Cloudflare!!!
http://bugs.winehq.org/show_bug.cgi?id=58287
--- Comment #3 from Ken Sharp imwellcushtymelike@gmail.com --- Created attachment 78832 --> http://bugs.winehq.org/attachment.cgi?id=78832 Patch (untested on live system)
Patches are also blocked by Cloudflare.
http://bugs.winehq.org/show_bug.cgi?id=58287
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |imwellcushtymelike@gmail.co | |m