{"action":"created","issue":{"url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/4956","repository_url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus","labels_url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/4956/labels{/name}","comments_url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/4956/comments","events_url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/4956/events","html_url":"https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4956","id":373500198,"node_id":"MDU6SXNzdWUzNzM1MDAxOTg=","number":4956,"title":"Save As dialog allows for restricted characters ( \\ / : * ? \" <> | ) in the filename.","user":{"login":"FillerInfo","id":39528443,"node_id":"MDQ6VXNlcjM5NTI4NDQz","avatar_url":"https://avatars3.githubusercontent.com/u/39528443?v=4","gravatar_id":"","url":"https://api.github.com/users/FillerInfo","html_url":"https://github.com/FillerInfo","followers_url":"https://api.github.com/users/FillerInfo/followers","following_url":"https://api.github.com/users/FillerInfo/following{/other_user}","gists_url":"https://api.github.com/users/FillerInfo/gists{/gist_id}","starred_url":"https://api.github.com/users/FillerInfo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FillerInfo/subscriptions","organizations_url":"https://api.github.com/users/FillerInfo/orgs","repos_url":"https://api.github.com/users/FillerInfo/repos","events_url":"https://api.github.com/users/FillerInfo/events{/privacy}","received_events_url":"https://api.github.com/users/FillerInfo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-24T14:03:19Z","updated_at":"2018-10-24T14:48:45Z","closed_at":null,"author_association":"NONE","body":"### Description of the Issue\r\n<!--- Provide a more detailed description to the issue itself -->\r\nWhen a user saves their file, it allows the user to type restricted characters in a filename. This causes the file to become empty (saying it has 0 bytes) after being saved. It will only be available in notepad++ until the file is closed in the editor, then it is permanently removed.\r\n\r\nTLDR: Restricted characters allowed, file does not save properly.\r\n### Steps to Reproduce the Issue\r\n<!--- Set of steps to reproduce this issue -->\r\n1. Create new file (Hotkey: Ctrl + n).\r\n2. Type anything.\r\n3. Attempt to save the file as (Ctrl + Alt + s).\r\n4. Type any name with restricted character ( \\ / : * ? \" <> | ) in the \"File name\" text field.\r\n5. Click \"Save\" button.\r\n6. View the file in File Explorer and it is empty.\r\n\r\n### Expected Behavior\r\n<!--- What did you expect to happen -->\r\nSave the file with all information with restricted filename character.\r\n### Actual Behavior\r\n<!--- What actually happened -->\r\nFile has 0 bytes and name is all characters before restricted character.\r\n### Debug Information\r\n<!--- Debug Info can be found under under the \"?\" menu -->\r\nN/A\r\n<!--- Feel free to include any other info, such as screenshots, etc -->\r\n![image](https://user-images.githubusercontent.com/39528443/47435443-404b9300-d76a-11e8-9346-67a5ecc7b29e.png)\r\nNew file with text\r\n\r\n![image](https://user-images.githubusercontent.com/39528443/47435559-7b4dc680-d76a-11e8-8cc3-07390756a4df.png)\r\nSave as with restricted filename character\r\n\r\n![image](https://user-images.githubusercontent.com/39528443/47435595-8dc80000-d76a-11e8-8aa3-a54b87d7e4ad.png)\r\nAppears to be saved here\r\n\r\n![image](https://user-images.githubusercontent.com/39528443/47435740-d2ec3200-d76a-11e8-86a0-278ccb8784aa.png)\r\nResults in a blank file\r\n\r\n![image](https://user-images.githubusercontent.com/39528443/47435915-134bb000-d76b-11e8-9ab6-db92dcdbf41b.png)\r\nExtra information if useful\r\n\r\nThank you for taking the time to look at my bug report as this has been the result of some notes in class being lost, and I would not like that to happen to anybody else."},"comment":{"url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/comments/432689600","html_url":"https://github.com/notepad-plus-plus/notepad-plus-plus/issues/4956#issuecomment-432689600","issue_url":"https://api.github.com/repos/notepad-plus-plus/notepad-plus-plus/issues/4956","id":432689600,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjY4OTYwMA==","user":{"login":"SinghRajenM","id":14791461,"node_id":"MDQ6VXNlcjE0NzkxNDYx","avatar_url":"https://avatars3.githubusercontent.com/u/14791461?v=4","gravatar_id":"","url":"https://api.github.com/users/SinghRajenM","html_url":"https://github.com/SinghRajenM","followers_url":"https://api.github.com/users/SinghRajenM/followers","following_url":"https://api.github.com/users/SinghRajenM/following{/other_user}","gists_url":"https://api.github.com/users/SinghRajenM/gists{/gist_id}","starred_url":"https://api.github.com/users/SinghRajenM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SinghRajenM/subscriptions","organizations_url":"https://api.github.com/users/SinghRajenM/orgs","repos_url":"https://api.github.com/users/SinghRajenM/repos","events_url":"https://api.github.com/users/SinghRajenM/events{/privacy}","received_events_url":"https://api.github.com/users/SinghRajenM/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T14:48:45Z","updated_at":"2018-10-24T14:48:45Z","author_association":"CONTRIBUTOR","body":"Below statement in file [FileDialog.cpp](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/519fecbb827eb011e6da6d546e5da1d22fb982a8/PowerEditor/src/WinControls/OpenSaveFileDialog/FileDialog.cpp#L266) causes this issue.\r\n\r\n```C++\r\n_ofn.Flags |= OFN_ENABLEHOOK | OFN_NOVALIDATE;\r\n```\r\n\r\nAs per [MSDN](https://docs.microsoft.com/en-us/windows/desktop/dlgbox/open-and-save-as-dialog-boxes)\r\n>  The dialog box automatically validates file names typed by the user to ensure that the names contain only valid characters. To override the file name character validation, set the OFN_NOVALIDATE flag.\r\n\r\n@donho must be knowing if there was any reason to disable this automatic filename validation.\r\n"}}
{"actor":{"display_login":"SinghRajenM"}}