From 712434d5d1ab97b491999b2f766acaf1a77ca23f Mon Sep 17 00:00:00 2001
From: productivemindspublishing
<61146914+productivemindspublishing@users.noreply.github.com>
Date: Mon, 16 Sep 2024 14:59:59 +0100
Subject: [PATCH 1/2] Update /theme-check/checks/class-title-check.php, replace
reg pattern modifier (/s) with (/i)
---
checks/class-title-check.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checks/class-title-check.php b/checks/class-title-check.php
index 2d7bae69..2bab5ed1 100644
--- a/checks/class-title-check.php
+++ b/checks/class-title-check.php
@@ -50,7 +50,7 @@ public function check( $php_files, $css_files, $other_files ) {
}
// Look for anything that looks like and exclude it (inline svg's have titles too).
- $file_content = preg_replace( '/.*<\/svg>/s', '', $file_content );
+ $file_content = preg_replace( '/.*<\/svg>/i', '', $file_content );
// Look for and tags.
checkcount();
From c683cf85c112f84f25bd56105ef424ceba1861af Mon Sep 17 00:00:00 2001
From: "productiveminds.com"
Date: Tue, 24 Sep 2024 19:51:47 +0100
Subject: [PATCH 2/2] Update class-title-check.php
Combine the three 'isU' modifiers because 's' returns null and only behaves correctly when combined with 'U'. Additionally, including the case-sensitive 'i' modifier can potentially improve accuracy.
---
checks/class-title-check.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checks/class-title-check.php b/checks/class-title-check.php
index 2bab5ed1..9f0c3515 100644
--- a/checks/class-title-check.php
+++ b/checks/class-title-check.php
@@ -50,7 +50,7 @@ public function check( $php_files, $css_files, $other_files ) {
}
// Look for anything that looks like and exclude it (inline svg's have titles too).
- $file_content = preg_replace( '/.*<\/svg>/i', '', $file_content );
+ $file_content = preg_replace( '/.*<\/svg>/isU', '', $file_content );
// Look for and tags.
checkcount();