allow meta tags with property instead of name in js replacement and hashbang crawling
This commit is contained in:
parent
58ac015301
commit
10fd286b53
@ -89,7 +89,11 @@ abstract class api_default extends api_system implements api_default_interface {
|
||||
for ($i = 0; $i < $meta->length; $i++) {
|
||||
if($meta->item($i)->getAttribute('name') == $key){
|
||||
$found = true;
|
||||
$meta->item($i)->setAttribute('content',$metavalue);}
|
||||
$meta->item($i)->setAttribute('content',$metavalue);
|
||||
}elseif($meta->item($i)->getAttribute('property') == $key){
|
||||
$found = true;
|
||||
$meta->item($i)->setAttribute('content',$metavalue);
|
||||
}
|
||||
}
|
||||
if(!$found){
|
||||
$node = $head->appendChild($html->createElement('meta'));
|
||||
|
||||
@ -69,8 +69,10 @@ SYSTEM.prototype.handle_call_pages_page = function (html,entry,id,forced,cached,
|
||||
for(var metaname in entry['meta']) {
|
||||
var key = metaname.split('_');
|
||||
key = key[key.length-1];
|
||||
if($('meta[name='+key+']').length > 0){
|
||||
$('meta[name='+key+']').attr('content',entry['meta'][metaname]);
|
||||
if($('meta[name="'+key+'"]').length > 0){
|
||||
$('meta[name="'+key+'"]').attr('content',entry['meta'][metaname]);
|
||||
} else if($('meta[property="'+key+'"]').length > 0){
|
||||
$('meta[property="'+key+'"]').attr('content',entry['meta'][metaname]);
|
||||
} else {
|
||||
$('head').append('<meta name="'+key+'" content="'+entry['meta'][metaname]+'">');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user