azurecurve / azrcrv-gallery-from-folder

Gallery From Folder plugin for ClassicPress
GNU General Public License v2.0
0 stars 1 forks source link

use proper sanitize function #3

Closed joyously closed 4 years ago

joyously commented 4 years ago

https://github.com/azurecurve/azrcrv-gallery-from-folder/blob/5ec12dcd9f8cb63c2720b3ab7be9cef72a2849b0/azrcrv-gallery-from-folder.php#L341

Instead of sanitize_text_field you should use sanitize_file_name for the default folder.

joyously commented 4 years ago

I just realized that maybe this is the path, not just a folder name. If so, you might use wp_strip_all_tags. Maybe improve the instructions for what should be entered.

azurecurve commented 4 years ago

I'm going to rewrite the settings and path handling to be more explicit and flexible.