$img = $doc->createElement('img');
$img->setAttribute("src", $entry->getAttribute("href"));
- $entry->parentNode->replaceChild($img, $entry);
+ $br = $doc->createElement('br');
+ $entry->parentNode->insertBefore($img, $entry);
+ $entry->parentNode->insertBefore($br, $entry);
$found = true;
}
if (preg_match("/^http:\/\/i.imgur.com\/$token\./", $aentry->getAttribute("src"))) {
$img = $doc->createElement('img');
$img->setAttribute("src", $aentry->getAttribute("src"));
+
+ $br = $doc->createElement('br');
+
$entry->parentNode->insertBefore($img, $entry);
+ $entry->parentNode->insertBefore($br, $entry);
+
$found = true;
break;
$img = $doc->createElement('img');
$img->setAttribute("src", $aentry->getAttribute("href"));
$entry->parentNode->insertBefore($doc->createElement('br'), $entry);
+
+ $br = $doc->createElement('br');
+
$entry->parentNode->insertBefore($img, $entry);
+ $entry->parentNode->insertBefore($br, $entry);
+
$found = true;
}
}