# HG changeset patch # User Kim Alvefur # Date 1410360475 -7200 # Node ID 95241c0f9244684754561db9e29cd1c2db06af36 # Parent e26176bf133400ad483d049173325227821c38cc util.vcard: Turn PHOTO fields into data-uris diff -r e26176bf1334 -r 95241c0f9244 util/vcard.lua --- a/util/vcard.lua Fri Sep 05 19:09:13 2014 +0100 +++ b/util/vcard.lua Wed Sep 10 16:47:55 2014 +0200 @@ -349,7 +349,11 @@ if prop_def == "text" then t:tag("text"):text(item[1]):up(); elseif prop_def == "uri" then - t:tag("uri"):text(item[1]):up(); + if item.ENCODING and item.ENCODING[1] == 'b' then + t:tag("uri"):text("data:;base64,"):text(item[1]):up(); + else + t:tag("uri"):text(item[1]):up(); + end elseif type(prop_def) == "table" then if prop_def.values then for i, v in ipairs(prop_def.values) do