Add test for image renderer
[MAILPOET-2086]
This commit is contained in:
committed by
M. Shull
parent
48a6a842da
commit
9a2101f13f
@@ -31,11 +31,10 @@ class Image {
|
||||
}
|
||||
|
||||
$image_template = '
|
||||
<img src="' . EHelper::escapeHtmlLinkAttr($element['src']) . '"
|
||||
width="' . EHelper::escapeHtmlAttr($element['width']) . '" alt="' . EHelper::escapeHtmlAttr($element['alt']) . '"' . $style . '/>
|
||||
<img src="' . EHelper::escapeHtmlLinkAttr($element['src']) . '" width="' . EHelper::escapeHtmlAttr($element['width']) . '" alt="' . EHelper::escapeHtmlAttr($element['alt']) . '"' . $style . '/>
|
||||
';
|
||||
if (!empty($element['link'])) {
|
||||
$image_template = '<a href="' . EHelper::escapeHtmlLinkAttr($element['link']) . '">' . $image_template . '</a>';
|
||||
$image_template = '<a href="' . EHelper::escapeHtmlLinkAttr($element['link']) . '">' . trim($image_template) . '</a>';
|
||||
}
|
||||
$align = 'center';
|
||||
if (!empty($element['styles']['block']['textAlign']) && in_array($element['styles']['block']['textAlign'], ['left', 'right'])) {
|
||||
@@ -45,7 +44,7 @@ class Image {
|
||||
$template = '
|
||||
<tr>
|
||||
<td class="mailpoet_image ' . (($element['fullWidth'] === false) ? 'mailpoet_padded_vertical mailpoet_padded_side' : '') . '" align="' . EHelper::escapeHtmlAttr($align) . '" valign="top">
|
||||
' . $image_template . '
|
||||
' . trim($image_template) . '
|
||||
</td>
|
||||
</tr>';
|
||||
return $template;
|
||||
|
Reference in New Issue
Block a user