diff --git a/groovy/src/main/java/org/kohsuke/stapler/jelly/groovy/JellyBuilder.java b/groovy/src/main/java/org/kohsuke/stapler/jelly/groovy/JellyBuilder.java
index <HASH>..<HASH> 100644
--- a/groovy/src/main/java/org/kohsuke/stapler/jelly/groovy/JellyBuilder.java
+++ b/groovy/src/main/java/org/kohsuke/stapler/jelly/groovy/JellyBuilder.java
@@ -24,6 +24,7 @@
 package org.kohsuke.stapler.jelly.groovy;
 
 import groovy.lang.Closure;
+import groovy.lang.GString;
 import groovy.lang.GroovyObjectSupport;
 import groovy.lang.MissingMethodException;
 import groovy.lang.MissingPropertyException;
@@ -322,8 +323,12 @@ public final class JellyBuilder extends GroovyObjectSupport {
                 if (attributes != null) {
                     for (Entry e : attributes.entrySet()) {
                         Object v = e.getValue();
-                        if (v!=null)
+                        if (v != null) {
+                            if (v instanceof GString) {
+                                v = v.toString();
+                            }
                             tagScript.addAttribute(e.getKey().toString(), new ConstantExpression(v));
+                        }
                     }
                 }
Convert GString to string when bridging to jelly.

When using a groovy view and passing a groovy expression as
"${e1}${e2}" to a taglib, the resulting value is not coerced to a
String, which can lead to incorrect results when calling functions from
within jelly.