mirror of
https://github.com/postgres/pgweb.git
synced 2026-01-14 03:17:45 +00:00
Add @img suffix to cid values
Turns out this is required to be spec-compliant. I don't think this was why things broke in my tests, but it is good to be comlpiant.
This commit is contained in:
@ -41,7 +41,7 @@ def render_news_template(news):
|
||||
'contenttype': '{}; name={}'.format(_get_contenttype_from_extension(f), f),
|
||||
'filename': f,
|
||||
'disposition': 'inline; filename="{}"'.format(f),
|
||||
'id': '<{}>'.format(f),
|
||||
'id': '<{}@img>'.format(f),
|
||||
}
|
||||
with open(os.path.join(basedir, f), "rb") as f:
|
||||
a['content'] = f.read()
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
{%block content%}
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center" style="width: 100%;">
|
||||
<tr>
|
||||
<td><img style="width: 50px; height: 50px;" height="50" width="50" src="cid:slonik.png" alt="PostgreSQL logo"></td>
|
||||
<td><img style="width: 50px; height: 50px;" height="50" width="50" src="cid:slonik.png@img" alt="PostgreSQL logo"></td>
|
||||
<td style="text-align: center;"><h1>{{news.title}}</h1></td>
|
||||
<td><img style="width: 50px; height: 50px;" height="50" width="50" src="cid:slonik.png" alt="PostgreSQL logo"></td>
|
||||
<td><img style="width: 50px; height: 50px;" height="50" width="50" src="cid:slonik.png@img" alt="PostgreSQL logo"></td>
|
||||
</tr>
|
||||
</table>
|
||||
{{news.content|markdown}}
|
||||
|
||||
Reference in New Issue
Block a user