Skip to content

Commit 9261f9c

Browse files
authored
Merge pull request #16 from horde/feat/port-pr-15-HTML-CVE-2025-30349-toCVE-2025-30349
feat/port pr 15 HTML CVE 2025 30349 toCVE 2025 30349
2 parents fd9212c + 7eaec46 commit 9261f9c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/Mime/Viewer/Html.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,16 @@ protected function _node($doc, $node)
352352
$node->setAttribute('style', $style . 'width:auto !important');
353353
break;
354354

355+
case 'source':
356+
if ($this->_imgBlock() &&
357+
$node->hasAttribute('srcset'))
358+
{
359+
$node->setAttribute(self::SRCSETBLOCK, $node->getAttribute('srcset'));
360+
$node->setAttribute('srcset', '');
361+
$this->_imptmp['imgblock'] = true;
362+
break;
363+
}
364+
355365
case 'img':
356366
case 'input':
357367
if ($node->hasAttribute('src')) {
@@ -454,6 +464,9 @@ protected function _node($doc, $node)
454464
$node->parentNode->removeChild($node);
455465
break;
456466
}
467+
if ($node->parentNode) {
468+
$node->parentNode->removeChild($node);
469+
}
457470
break;
458471

459472
case 'table':

0 commit comments

Comments
 (0)