lesterchan / wp-downloadmanager

Adds a simple download manager to your WordPress blog.
https://wordpress.org/plugins/wp-downloadmanager/
17 stars 15 forks source link

Categories not sanitized in Options #32

Closed ipreiml closed 2 years ago

ipreiml commented 2 years ago

Hi there lesterchan!

Thank you for your efforts in providing your downloadmanger!

I am using version 1.68.7 of the plugin and was trying to change the categories but failed. I found the issue "categories don't works correctly #31" and took note of the suggested solution.

However I would like to recommend to not remove "sanitize_text_field()" in line 24 of the code but to replace it with "sanitize_textarea_field()". This function does sanitize the input and leaves newlines "\n" intact (https://developer.wordpress.org/reference/functions/sanitize_textarea_field/). I have tested this solution and found it working. I have attached the changed file to the issue in case you want to take a look. download-options.txt

Best regards and keep up the good work! I

lesterchan commented 2 years ago

I have released the fix