integrated Stapler that handles escaping on i18n exps in a new way

This commit is contained in:
Kohsuke Kawaguchi committed 2011-04-12 12:37:11 -07:00
1 parent b5843f3b77
commit f561d53bdb
2 files changed
+9 -1

No files matched your search

+8
View File
@@ -84,6 +84,7 @@ import org.kohsuke.stapler.Ancestor;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.jelly.InternationalizedStringExpression.RawHtmlArgument;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
@@ -1365,4 +1366,11 @@ public class Functions {
}
return r;
}
/**
* Used for arguments to internationalized expressions to avoid escape
*/
public static Object rawHtml(Object o) {
return o==null ? null : new RawHtmlArgument(o);
}
}