Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where Facebook profiles get added to author field #3103

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions Embedded Metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2023-04-24 14:42:56"
"lastUpdated": "2023-08-11 09:54:50"
}

/*
Expand Down Expand Up @@ -736,7 +736,7 @@ function tryOgAuthors(doc) {
var authors = [];
var ogAuthors = ZU.xpath(doc, '//meta[@property="article:author" or @property="video:director" or @property="music:musician"]');
for (var i = 0; i < ogAuthors.length; i++) {
if (ogAuthors[i].content && /(https?:\/\/)?[\da-z.-]+\.[a-z.]{2,6}/.test(ogAuthors[i].content) && ogAuthors[i].content !== "false") {
if (ogAuthors[i].content && !/(https?:\/\/)?[\da-z.-]+\.[a-z.]{2,6}/.test(ogAuthors[i].content) && ogAuthors[i].content !== "false") {
authors.push(ZU.cleanAuthor(ogAuthors[i].content, "author"));
}
}
Expand Down Expand Up @@ -2008,6 +2008,31 @@ var testCases = [
"seeAlso": []
}
]
},
{
"type": "web",
"url": "https://www.nhs.uk/conditions/baby/babys-development/behaviour/separation-anxiety/",
"items": [
{
"itemType": "webpage",
"title": "Separation anxiety",
"creators": [],
"date": "7 Dec 2020, 4:40 p.m.",
"abstractNote": "Separation anxiety is a normal part of your child's development. Find out how to handle the times when your baby or toddler cries or is clingy when you leave them.",
"language": "en",
"url": "https://www.nhs.uk/conditions/baby/babys-development/behaviour/separation-anxiety/",
"websiteTitle": "nhs.uk",
"attachments": [
{
"title": "Snapshot",
"mimeType": "text/html"
}
],
"tags": [],
"notes": [],
"seeAlso": []
}
]
}
]
/** END TEST CASES **/
Loading