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
_stringify handles quoted strings incorrectly #78155
Comments
_stringify escapes special characters so they can be processed by tcl/tk. To that end, two different escaping techniques are implemented: put a backslash in front of every special character or put the entire string in curly braces. However, a string like the following one: '"C:\\Windows\\System32\\notepad.exe" "afile.txt"' will be incorrectly escaped to '"C:\\\\Windows\\\\System32\\\\notepad.exe"\\ "afile.txt"' Tcl/TK will interpret this as a quoted string, but with a backslash after it (the one escaping the space between the quoted strings), throwing this exception: The attached patch escapes this to '{"C:\\\\Windows\\\\System32\\\\notepad.exe" "afile.txt"}' I am not 100% sure that this is correct since double backslashes seem to be displayed now. |
How did you find this bug? |
I tried to display entries from the Windows Registry in a TreeView. |
This issue needs more complex fix. PR 7986 adds necessary changes and tests. Thank you for your report Gauchj. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: