diff --git a/parsers/HTML/HTMLBBCodeParser.php b/parsers/HTML/HTMLBBCodeParser.php
index f113e23ee..6427e909f 100644
--- a/parsers/HTML/HTMLBBCodeParser.php
+++ b/parsers/HTML/HTMLBBCodeParser.php
@@ -502,7 +502,8 @@ class SSHTMLBBCodeParser
 				{
 					if (trim($tag['text']) == '') {
 						//just an empty indentation or newline without value?
-						continue;
+						//skip this iteration of the foreach loop
+						continue 2;
 					}
 					$newTagArray[] = $child;
 					$openTags[] = $child['tag'];