2
0
mirror of https://github.com/Y2Z/monolith synced 2024-11-10 19:10:29 +00:00

Merge branch 'master' into ignore-ca

This commit is contained in:
Vincent Flyson 2019-08-27 06:55:00 -04:00 committed by GitHub
commit 2251c086c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,7 +299,14 @@ pub fn walk_and_embed_assets(
"iframe" => {
for attr in attrs_mut.iter_mut() {
if &attr.name.local == "src" {
let src_full_url: String = resolve_url(&url, &attr.value.to_string())
let value = attr.value.to_string();
// Ignore iframes with empty source (they cause infinite loops)
if value == EMPTY_STRING.clone() {
continue;
}
let src_full_url: String = resolve_url(&url, &value)
.unwrap_or(EMPTY_STRING.clone());
let iframe_data = retrieve_asset(
&src_full_url,