@@ -692,8 +692,8 @@ protected function parse_selector($selector_string) {
692
692
// Notice the \[ starting the attbute? and the @? following? This implies that an attribute can begin with an @ sign that is not captured.
693
693
// This implies that an html attribute specifier may start with an @ sign that is NOT captured by the expression.
694
694
// farther study is required to determine of this should be documented or removed.
695
- // $pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is";
696
- $ pattern = "/([\w-:\*]*)(?:\#([\w-]+)|\.([\w-]+))?(?:\[@?(!?[\w-:]+)(?:([!*^$]?=)[ \"']?(.*?)[ \"']?)?\])?([\/, ]+)/is " ;
695
+ // $pattern = "/([\w\ -:\*]*)(?:\#([\w\ -]+)|\.([\w\ -]+))?(?:\[@?(!?[\w\ -]+)(?:([!*^$]?=)[\"']?(.*?)[\"']?)?\])?([\/, ]+)/is";
696
+ $ pattern = "/([\w\ -:\*]*)(?:\#([\w\ -]+)|\.([\w\ -]+))?(?:\[@?(!?[\w\ -:]+)(?:([!*^$]?=)[ \"']?(.*?)[ \"']?)?\])?([\/, ]+)/is " ;
697
697
preg_match_all ($ pattern , trim ($ selector_string ).' ' , $ matches , PREG_SET_ORDER );
698
698
if (is_object ($ debugObject )) {$ debugObject ->debugLog (2 , "Matches Array: " , $ matches );}
699
699
@@ -899,7 +899,7 @@ function get_display_size()
899
899
{
900
900
// Thanks to user gnarf from stackoverflow for this regular expression.
901
901
$ attributes = array ();
902
- preg_match_all ("/([\w-]+)\s*:\s*([^;]+)\s*;?/ " , $ this ->attr ['style ' ], $ matches , PREG_SET_ORDER );
902
+ preg_match_all ("/([\w\ -]+)\s*:\s*([^;]+)\s*;?/ " , $ this ->attr ['style ' ], $ matches , PREG_SET_ORDER );
903
903
foreach ($ matches as $ match ) {
904
904
$ attributes [$ match [1 ]] = $ match [2 ];
905
905
}
@@ -1375,7 +1375,7 @@ protected function read_tag()
1375
1375
return true ;
1376
1376
}
1377
1377
1378
- if (!preg_match ("/^[\w-:]+$/ " , $ tag )) {
1378
+ if (!preg_match ("/^[\w\ -:]+$/ " , $ tag )) {
1379
1379
$ node ->_ [HDOM_INFO_TEXT ] = '< ' . $ tag . $ this ->copy_until ('<> ' );
1380
1380
if ($ this ->char ==='< ' ) {
1381
1381
$ this ->link_nodes ($ node , false );
0 commit comments