mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-14 20:10:59 +00:00
use self.attrs in AbstractRendition.img_tag to avoid duplication
This commit is contained in:
parent
188b17526d
commit
4e8e1f97ca
1 changed files with 1 additions and 3 deletions
|
|
@ -243,9 +243,7 @@ class AbstractRendition(models.Model):
|
|||
)
|
||||
|
||||
def img_tag(self):
|
||||
return mark_safe(
|
||||
'<img src="%s" width="%d" height="%d" alt="%s">' % (escape(self.url), self.width, self.height, escape(self.image.title))
|
||||
)
|
||||
return mark_safe('<img %s>' % self.attrs)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue