email-gravatar: fix html syntax issues
* make ampersand a html entity * add required alt attribute * add required img end tag
Cette révision appartient à :
Parent
46176eca7f
révision
1167dbb95b
@ -15,7 +15,7 @@ function filter_open(email, page)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function filter_close()
|
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&d=retro' style='height:10pt;width:10pt' alt='Gravatar' /> " .. buffer)
|
||||||
end
|
end
|
||||||
|
|
||||||
function filter_write(str)
|
function filter_write(str)
|
||||||
|
@ -36,4 +36,4 @@ sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach())
|
|||||||
md5 = hashlib.md5(email.encode()).hexdigest()
|
md5 = hashlib.md5(email.encode()).hexdigest()
|
||||||
text = sys.stdin.read().strip()
|
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&d=retro' style='height:10pt;width:10pt' alt='Gravatar' /> " + text)
|
||||||
|
Chargement…
Référencer dans un nouveau ticket
Block a user