Bugfixes: Correct email validation in comments.php (see #c4ce531); Fixed brackets in core.wp-formatting.php (thanks Lubomir!)

This commit is contained in:
azett 2019-01-11 09:00:11 +01:00
parent 046e24dd3c
commit 9d45056f97
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ function comment_validate() {
*/ */
if ($email) { if ($email) {
if (!filter_var($url, FILTER_VALIDATE_EMAIL)) { if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$errors ['email'] = $lerr ['email']; $errors ['email'] = $lerr ['email'];
} }
} }

View File

@ -66,7 +66,7 @@ function wptexturize($text) {
} elseif (strstr($curl, '</') || strstr($curl, '/>')) { } elseif (strstr($curl, '</') || strstr($curl, '/>')) {
if ($skip > 0) if ($skip > 0)
$skip--; $skip--;
} elseif (strstr($curl, '<code') || strstr($curl, '<pre') || strstr($curl, '<kbd' || strstr($curl, '<style') || strstr($curl, '<script'))) { } elseif (strstr($curl, '<code') || strstr($curl, '<pre') || strstr($curl, '<kbd') || strstr($curl, '<style') || strstr($curl, '<script')) {
// strstr is fast // strstr is fast
$skip++; $skip++;
} else { } else {