Ensure we do not extract truncated URL for Homepage directive

Related feedback:
- b12e0e05ea (commitcomment-44309540)
This commit is contained in:
Raymond Hill 2020-11-18 12:14:23 -05:00
parent 6b1a9e7aee
commit ee2fd45f00
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 1 additions and 1 deletions

View File

@ -801,7 +801,7 @@ self.addEventListener('hiddenSettingsChanged', ( ) => {
listEntry.title = this.orphanizeString(title);
this.assets.registerAssetSource(assetKey, { title });
}
matches = head.match(/(?:^|\n)(?:!|# )[\t ]*Homepage[\t ]*:[\t ]*(https?:\/\/\S+)/i);
matches = head.match(/(?:^|\n)(?:!|# )[\t ]*Homepage[\t ]*:[\t ]*(https?:\/\/\S+)\s/i);
const supportURL = matches && matches[1] || '';
if ( supportURL !== '' && supportURL !== listEntry.supportURL ) {
listEntry.supportURL = this.orphanizeString(supportURL);