Img tags in template can throw 404 error

I noticed an error in Firefox (147.0.1) where a 404 error is thrown when trying to obtain an image source of an image contained in a template element. This does not seem to occur in Chrome.

Example:

<template class="dj-dropbox-items">
	<img src="${thumbnail_url}"> <!-- throws a 404 error in the network console -->
	<figcaption>
		<dl>
			<dt>Name:</dt>
			<dd>${name}</dd>
		</dl>
		<dl>
			<dt>Content-Type (Size):</dt>
			<dd>${content_type} (${size})</dd>
		</dl>
		<div>
			<a class="dj-delete-file btn btn-warning btn-sm">Delete</a>
			<a class="dj-download-file btn btn-light btn-sm" href="${download_url}" download="${name}">Download</a>
		</div>
	</figcaption>
</template>

A live example of this can be seen here: Django-Formset Demo

The expected behavior is that image elements in template elements should not be fetched, and thus should not throw a 404 error.

1 Like

This forum isn’t very active and it isn’t a good way to reach developers or to get help. Bugs should be reported in Bugzilla and the Matrix is a good way to have a discussion. One you have a Matrix account join the Firefox Desktop Community room