You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate the source code for an image in the current format
"""
CF=type(self)
return {
CF.REST: f".. image:: {url}\n :alt: {alt_text}",
CF.HTML: f'<img src="{url}" alt="{alt_text}">',
.
As-is, the "Raw HTML" copy button will generate invalid markup when it contains double quotes. For example:
<imgsrc="https://media.djangoproject.com/blog/images/2025/04/20250416-run-your-tests-against.webp" alt="Sage presenting, holding a microphone. To his right his title slide states "RunyourtestsagainstDjango’smain!", "Django London Meetup", "Thursday, 13 February 2025"">
The text was updated successfully, but these errors were encountered:
From #2001 – the
alt
attribute contents need escaping for HTML, here:djangoproject.com/blog/models.py
Lines 67 to 74 in 92ca24f
As-is, the "Raw HTML" copy button will generate invalid markup when it contains double quotes. For example:
The text was updated successfully, but these errors were encountered: