List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH 1/1] fix html syntax in email-gravatar.*
@ 2014-01-14 11:01 mail
  2014-01-14 12:49 ` Jason
  0 siblings, 1 reply; 2+ messages in thread
From: mail @ 2014-01-14 11:01 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] fix html syntax in email-gravatar.*
  2014-01-14 11:01 [PATCH 1/1] fix html syntax in email-gravatar.* mail
@ 2014-01-14 12:49 ` Jason
  0 siblings, 0 replies; 2+ messages in thread
From: Jason @ 2014-01-14 12:49 UTC (permalink / raw)


Good catch with &amp;. Merged.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20140114/783e41bb/attachment.html>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-14 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14 11:01 [PATCH 1/1] fix html syntax in email-gravatar.* mail
2014-01-14 12:49 ` Jason

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).