Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/x-html2md-media-src' into x-ht…
Browse files Browse the repository at this point in the history
…ml2md-media-src
  • Loading branch information
buuhuu committed Aug 28, 2023
2 parents 2274d2d + 03bb8bd commit 7511ebc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mdast-process-images.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ function createFilter(log, baseUrlStr, imgSrcPolicy) {
const protocolEndIdx = policyValue.indexOf('://');
let host = protocolEndIdx < 0 ? policyValue : policyValue.substring(protocolEndIdx + 3);
const slashIdx = host.indexOf('/');
if (slashIdx >= 0) host = host.substring(0, slashIdx);
if (slashIdx >= 0) {
host = host.substring(0, slashIdx);
}

if (host.startsWith('*')) {
// allow subdomain
Expand Down

0 comments on commit 7511ebc

Please sign in to comment.