Skip to content

Commit

Permalink
[fix] refs EC-CUBE#129 SC_CheckError::HTML_TAG_CHECK() 数字を含むタグを正しく扱えない
Browse files Browse the repository at this point in the history
正規表現を考えた際の参考 http://w3c.github.io/html-reference/syntax.html#syntax-elements (本当は、W3C より、ブラウザーの実装を参考にすべきかも。)
  • Loading branch information
seasoftjapan committed Aug 18, 2018
1 parent 212fb1f commit d1c040a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/class/SC_CheckError.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 6 additions & 1 deletion html/install/sql/insert_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit d1c040a

Please sign in to comment.