update the parser lib
This commit is contained in:
parent
55907cf599
commit
fbf58ea0c4
2 changed files with 14 additions and 3 deletions
|
@ -158,6 +158,8 @@ class HTML5_TreeBuilder {
|
|||
|
||||
if ($this->ignore_lf_token) $this->ignore_lf_token--;
|
||||
$this->ignored = false;
|
||||
|
||||
$token['name'] = str_replace(':', '-', $token['name']);
|
||||
// indenting is a little wonky, this can be changed later on
|
||||
switch ($mode) {
|
||||
|
||||
|
@ -3041,7 +3043,13 @@ class HTML5_TreeBuilder {
|
|||
|
||||
if (!empty($token['attr'])) {
|
||||
foreach($token['attr'] as $attr) {
|
||||
if(!$el->hasAttribute($attr['name'])) {
|
||||
|
||||
// mike@macgirvin.com 2011-11-17, check attribute name for
|
||||
// validity (ignoring extenders and combiners) as illegal chars in names
|
||||
// causes everything to abort
|
||||
|
||||
$valid = preg_match('/^[a-zA-Z\_\:]([\-a-zA-Z0-9\_\:\.]+$)/',$attr['name'],$matches);
|
||||
if($attr['name'] && (!$el->hasAttribute($attr['name'])) && ($valid)) {
|
||||
$el->setAttribute($attr['name'], $attr['value']);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ function submit_content(&$a) {
|
|||
if(! strlen($url))
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
logger('Updating: ' . $url);
|
||||
|
||||
$nurl = str_replace(array('https:','//www.'), array('http:','//'), $url);
|
||||
|
@ -30,6 +32,7 @@ function submit_content(&$a) {
|
|||
|
||||
$parms = scrape_dfrn($url);
|
||||
|
||||
// logger('dir_submit: ' . print_r($parms,true));
|
||||
|
||||
if((! count($parms)) || (validate_dfrn($parms))) {
|
||||
exit;
|
||||
|
|
Loading…
Reference in a new issue