Skip to content

Commit

Permalink
Add width and height attributes to img tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jagregory committed Nov 16, 2011
1 parent dad5c00 commit 56061a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/views/tags/gravatar/Gravatar.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ public static void _img (Map<?, ?> args, Closure body, PrintWriter out,
GroovyTemplate.ExecutableTemplate template, int fromLine) {
out.print("<img src=\"");
_url(args,body,out,template,fromLine);
out.print("\" />");
out.print("\"");
if (args.containsKey("size")) {
out.print(" width=\""+args.get("size")+"\"");
out.print(" height=\""+args.get("size")+"\"");
}
out.print(" />");
}

public static void _url (Map<?, ?> args, Closure body, PrintWriter out,
Expand Down

0 comments on commit 56061a9

Please sign in to comment.