diff options
author | fox <[email protected]> | 2020-05-17 05:20:23 +0000 |
---|---|---|
committer | Gogs <[email protected]> | 2020-05-17 05:20:23 +0000 |
commit | 3dc506a19ac483c60cf2800066e4403df4db0ef1 (patch) | |
tree | fbed1f6a834436118871dad7de42b856c7a795e9 /include/functions.php | |
parent | a1ffc116196e023491ff2c3c7b24f48924ea4fd1 (diff) | |
parent | c93bcef91f82493e248e2f7085883d81e95dd136 (diff) |
Merge branch 'responsive-iframes' of JustAMacUser/tt-rss into master
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php index 707a87e94..57acb7a24 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1373,6 +1373,14 @@ $doc->removeChild($doc->firstChild); //remove doctype $doc = strip_harmful_tags($doc, $allowed_elements, $disallowed_attributes); + $entries = $xpath->query('//iframe'); + foreach ($entries as $entry) { + $div = $doc->createElement('div'); + $div->setAttribute('class', 'embed-responsive'); + $entry->parentNode->replaceChild($div, $entry); + $div->appendChild($entry); + } + if ($highlight_words && is_array($highlight_words)) { foreach ($highlight_words as $word) { |