List for cgit developers and users
 help / color / mirror / Atom feed
From: mail at eworm.de (Christian Hesse)
Subject: [PATCH 1/1] fix html syntax in email-gravatar.*
Date: Tue, 14 Jan 2014 12:01:58 +0100	[thread overview]
Message-ID: <1389697318-17045-1-git-send-email-mail@eworm.de> (raw)

* make ampersand a html entity
* add required alt attribute
* add required img end tag
---
 filters/email-gravatar.lua | 2 +-
 filters/email-gravatar.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/filters/email-gravatar.lua b/filters/email-gravatar.lua
index 9feb611..22f0641 100644
--- a/filters/email-gravatar.lua
+++ b/filters/email-gravatar.lua
@@ -15,7 +15,7 @@ function filter_open(email, page)
 end
 
 function filter_close()
-	html("<img src='//www.gravatar.com/avatar/" .. md5 .. "?s=13&d=retro' style='height:10pt;width:10pt'> " .. buffer)
+	html("<img src='//www.gravatar.com/avatar/" .. md5 .. "?s=13&amp;d=retro' style='height:10pt;width:10pt' alt='Gravatar' /> " .. buffer)
 end
 
 function filter_write(str)
diff --git a/filters/email-gravatar.py b/filters/email-gravatar.py
index 5d08ea8..97f21cf 100755
--- a/filters/email-gravatar.py
+++ b/filters/email-gravatar.py
@@ -36,4 +36,4 @@ sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
 md5 = hashlib.md5(email.encode()).hexdigest()
 text = sys.stdin.read().strip()
 
-print("<img src='//www.gravatar.com/avatar/" + md5 + "?s=13&d=retro' style='height:10pt;width:10pt'> " + text)
+print("<img src='//www.gravatar.com/avatar/" + md5 + "?s=13&amp;d=retro' style='height:10pt;width:10pt' alt='Gravatar' /> " + text)
-- 
1.8.5.2



             reply	other threads:[~2014-01-14 11:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 11:01 mail [this message]
2014-01-14 12:49 ` Jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389697318-17045-1-git-send-email-mail@eworm.de \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).