| @@ -26,8 +26,9 @@ | ||
| 26 | 26 | $this->profile = new Profile(); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | + * @since 4.16.7 Only pass string tokens to urlencode(). | |
| 30 | 31 | * @since 3.6.0 Escape attributes |
| 31 | 32 | * |
| 32 | 33 | * @param array $attributes |
| 33 | 34 | * |
| @@ -43,9 +44,12 @@ | ||
| 43 | 44 | $queryArgs['accent-color'] = urlencode(esc_attr($attributes['accent_color'])); |
| 44 | 45 | } |
| 45 | 46 | |
| 46 | 47 | if (isset($_GET['give_nl'])) { |
| 47 | - $queryArgs['give_nl'] = urlencode(give_clean($_GET['give_nl'])); | |
| 48 | + $giveNl = give_clean($_GET['give_nl']); | |
| 49 | + if (is_string($giveNl)) { | |
| 50 | + $queryArgs['give_nl'] = urlencode($giveNl); | |
| 51 | + } | |
| 48 | 52 | } |
| 49 | 53 | |
| 50 | 54 | if (isset($_GET['_give_hash'])) { |
| 51 | 55 | $queryArgs['_give_hash'] = urlencode(give_clean($_GET['_give_hash'])); |