-
Notifications
You must be signed in to change notification settings - Fork 391
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gnoweb): escape bash chars in help args (#3672)
This PR ensures that special characters like ! and ? in user inputs are properly escaped when generating commands in the docs page ($help). Previously, entering ! or any other special char could cause the command string to break by omitting a closing ", making it invalid. This fix applies proper escaping to prevent such issues, ensuring that generated commands remain valid and executable. The fix introduces an escaping function that handles shell-sensitive characters before inserting them into the generated command strings. This approach ensures the commands remain intact without affecting their output when executed. Thus, the escape char is also removed from the cmd when the shell-sensitive char is removed from the arg input. cf: [issue 3355](#3355 (comment))
- Loading branch information
1 parent
0b76b0b
commit 0bc4423
Showing
5 changed files
with
12 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.