- $width = $a->hasAttribute('width') ? ((int)$a->getAttribute('width')) : false;
- $height= $a->hasAttribute('height') ? ((int)$a->getAttribute('height')) : false;
+ $width = $a->hasAttribute('width') ? $a->getAttribute('width') : false;
+ $height= $a->hasAttribute('height') ? $a->getAttribute('height') : false;
+ $width = $width == false || strpos($width,'%') != -1 ? false : (int) $width;
+ $height = $height== false || strpos($height,'%') != -1 ? false : (int) $height;
+