Appending a new brick to a noscript tag return a string

Hi there,
I was trying to append an <img> to a <noscript> tag for a LazyLoading purpose. The fact is that everything i append to the noscript tag is showed as a text. If i replace noscript by div or whatever the img is showed.

image

Here the code used:

$img_attr = [
    'src'    => $src,
    'srcset' => $srcset,
    'sizes'  => $sizes,
    'alt'    => $image->attr_alt(),
    'title'  => $image->attr_title(),
    'width'  => $max_width,
    'height' => $max_height,
];
$img_block = brick('noscript')->addClass('img');
$img_block->append(function() use($img_attr) {
    return brick('img')->attr($img_attr);
});
echo $img_block;

What the cause of this issue?
Thanks!

Doesn’t this turn out correctly once you disable JavaScript? And it should also be show “normally” if you look at the source code.

Yes it is. On the source code there just no syntax color on the element bu there’s no quotes around.
Why quotes are added around when it’s appended to the noscript tag?

Don’t know but this is not a Kirby issue, it is the same no matter if you use the brick class or if you just add plain HTML in your template.