From d1c040afb4646913e5e7da3ae67c9a1a408f6100 Mon Sep 17 00:00:00 2001 From: Seasoft Date: Sun, 19 Aug 2018 00:33:48 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20refs=20#129=20SC=5FCheckError::HTML=5FT?= =?UTF-8?q?AG=5FCHECK()=20=E6=95=B0=E5=AD=97=E3=82=92=E5=90=AB=E3=82=80?= =?UTF-8?q?=E3=82=BF=E3=82=B0=E3=82=92=E6=AD=A3=E3=81=97=E3=81=8F=E6=89=B1?= =?UTF-8?q?=E3=81=88=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 正規表現を考えた際の参考 http://w3c.github.io/html-reference/syntax.html#syntax-elements (本当は、W3C より、ブラウザーの実装を参考にすべきかも。) --- data/class/SC_CheckError.php | 2 +- html/install/sql/insert_data.sql | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/data/class/SC_CheckError.php b/data/class/SC_CheckError.php index 29ec38dcfe..797e32fbed 100644 --- a/data/class/SC_CheckError.php +++ b/data/class/SC_CheckError.php @@ -74,7 +74,7 @@ public function HTML_TAG_CHECK($value) // HTMLに含まれているタグを抽出する $match = array(); - preg_match_all('/<\/?([a-z]+)/i', $this->arrParam[$keyname], $match); + preg_match_all('/<\/?([a-z\d]+)/i', $this->arrParam[$keyname], $match); $arrTagIncludedHtml = $match[1]; // 抽出結果を小文字に変換 foreach ($arrTagIncludedHtml as $key => $matchedTag) { diff --git a/html/install/sql/insert_data.sql b/html/install/sql/insert_data.sql index bcf5aa6592..e6e4f8acde 100644 --- a/html/install/sql/insert_data.sql +++ b/html/install/sql/insert_data.sql @@ -737,7 +737,6 @@ INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (5, 'blink', 5); INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (6, 'br', 6); INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (7, 'center', 7); INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (8, 'font', 8); -INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (9, 'h', 9); INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (10, 'hr', 10); INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (11, 'img', 11); INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (12, 'li', 12); @@ -747,6 +746,12 @@ INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (15, 'div', 15); INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (16, 'i', 16); INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (17, 'u', 17); INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (18, 's', 18); +INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (19, 'h1', 19); +INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (20, 'h2', 20); +INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (21, 'h3', 21); +INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (22, 'h4', 22); +INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (23, 'h5', 23); +INSERT INTO mtb_allowed_tag (id, name, rank) VALUES (24, 'h6', 24); INSERT INTO mtb_authority (id, name, rank) VALUES (0, 'システム管理者', 0); INSERT INTO mtb_authority (id, name, rank) VALUES (1, '店舗オーナー', 1);