Plugin Directory

Changeset 2049081


Ignore:
Timestamp:
03/12/2019 01:33:49 PM (7 years ago)
Author:
ken107
Message:

fix validation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sitespeaker-widget/trunk/sitespeaker.php

    r2048540 r2049081  
    8080   
    8181    if (!preg_match('/^\w+$/', $newinput['api_key'])) $newinput['api_key'] = '';
    82     if (!preg_match('/^\w+$/', $newinput['lang'])) $newinput['lang'] = '';
    83     if (!preg_match('/^[^"]+$/', $newinput['voice'])) $newinput['voice'] = '';
     82    if (!preg_match('/^[\w-]+$/', $newinput['lang'])) $newinput['lang'] = '';
     83    if (!preg_match('/^[\w -]+$/', $newinput['voice'])) $newinput['voice'] = '';
    8484
    8585    return $newinput;
Note: See TracChangeset for help on using the changeset viewer.