| @@ -17,9 +17,9 @@ | ||
| 17 | 17 | abstract protected function getWordpressConfig(): WordpressConfig; |
| 18 | 18 | |
| 19 | 19 | public function getRequestUrl(): string |
| 20 | 20 | { |
| 21 | - return htmlentities($_SERVER['REQUEST_URI'], ENT_NOQUOTES); | |
| 21 | + return htmlentities($_SERVER['REQUEST_URI'] ?? '', ENT_QUOTES); | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | private function sanitizeValue(mixed $value): mixed |
| 25 | 25 | { |
| @@ -33,9 +33,9 @@ | ||
| 33 | 33 | return $sanitized; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | if (is_string($value) === true) { |
| 37 | - return htmlspecialchars(stripslashes(preg_replace('/\\+(["|\'])/', '$1', $value)), ENT_NOQUOTES); | |
| 37 | + return htmlspecialchars(stripslashes($value), ENT_QUOTES); | |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | return $value; |
| 41 | 41 | } |