Sửa lỗi Simple HTML Dom phiên bản simplehtmldom_1_9_1(ok)

Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in C:\xampp\htdocs\abc\simple_html_dom.php on line 1364

THay

if (!preg_match("/^[\w-:]+$/", $tag)) {

Thành

if (!preg_match("/^[-\w:]+$/", $tag)) { 

Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in C:\xampp\htdocs\abc\simple_html_dom.php on line 685

Thay

$pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is";

Thành

$pattern = "/([\w\-:\*]*)(?:\#([\w\-]+)|\.([\w\-]+))?(?:\[@?(!?[\w\-]+)(?:([!*^$]?=)[\”‘]?(.*?)[\”‘]?)?\])?([\/, ]+)/is";

Last updated