Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Script info
Description
As a new user of pyrnotify I proofreaded the code before using it and fixed a few things, sorted by importance (most important first):
-w mdkwas crashing notify-send with theOption inconnue -w mdkmessage (Unknown option -w mdk).re.sub(r'([\\"\'])', r'\\\1', s)to serialize arguments in a shell-like form was hurting my eyes, both from a security and from a readability point of view. I did not attempted to exploit it though, maybe it's safe, it just calls to be exploited. I replaced "shell-like-serialization" with json, so we don't have to care about quotes, the json module does.I did this "in the rush" to test it for myself, outside the git repo, I'm very sorry it's a single big ugly commit, if needed I'm OK to split this cleanly for easier code review.
Checklist (script update)
script_name.py X.Y: …