Completed
Branch master (5b1d5e)
by Gordon
20:19
created
code/RemoveImageSourceAttribute.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,8 +7,10 @@
 block discarded – undo
7 7
 	 */
8 8
 	public function ResponsiveTinyMCEImages($html) {
9 9
 		$dom = Injector::inst()->create('HTMLValue', $html);
10
-		if($images = $dom->getElementsByTagName('img')) foreach($images as $img) {
10
+		if($images = $dom->getElementsByTagName('img')) {
11
+		    foreach($images as $img) {
11 12
 			$cssclass = $img->getAttribute('class');
13
+		}
12 14
 			$pos = strpos($cssclass, 'tinymce');
13 15
 			if ($pos !== false) {
14 16
 				$img->removeAttribute('src');
Please login to merge, or discard this patch.