//# 0 errors, 43 messages
//#
package net.sourceforge.pebble.web.tagext;
    //#urlfunctions.java:1:1: class: net.sourceforge.pebble.web.tagext.UrlFunctions
    //#urlfunctions.java:1:1: method: net.sourceforge.pebble.web.tagext.UrlFunctions.net.sourceforge.pebble.web.tagext.UrlFunctions__static_init

import net.sourceforge.pebble.util.StringUtils;
import net.sourceforge.pebble.util.UrlRewriter;
/**
 * Used from jsp taglib url.tld 
 * @author Olaf Kock
 * @see UrlRewriter
 */
public class UrlFunctions {
    //#urlfunctions.java:10: method: void net.sourceforge.pebble.web.tagext.UrlFunctions.net.sourceforge.pebble.web.tagext.UrlFunctions()
    //#urlfunctions.java:10: end of method: void net.sourceforge.pebble.web.tagext.UrlFunctions.net.sourceforge.pebble.web.tagext.UrlFunctions()
	public static String rewrite(String url) {
		// if you'd like to see the decorated urls highlighted, 
		// a html injection is commented. This wouldn't work 
		// for all cases, but gives an idea where rewriting an
		// url is done (and has succeeded)
		return UrlRewriter.doRewrite(url); // + "\" style=\"background-color:blue";
    //#urlfunctions.java:16: method: String net.sourceforge.pebble.web.tagext.UrlFunctions.rewrite(String)
    //#input(String rewrite(String)): net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).__Tag
    //#input(String rewrite(String)): net/sourceforge/pebble/PebbleContext.__Descendant_Table[net/sourceforge/pebble/PebbleContext]
    //#input(String rewrite(String)): net/sourceforge/pebble/PebbleContext.__Dispatch_Table.getConfiguration()Lnet/sourceforge/pebble/Configuration;
    //#input(String rewrite(String)): net/sourceforge/pebble/PebbleContext.instance
    //#input(String rewrite(String)): net/sourceforge/pebble/util/HttpsURLRewriter.__Dispatch_Table.rewrite(Ljava/lang/String;)Ljava/lang/String;
    //#input(String rewrite(String)): net/sourceforge/pebble/util/NullUrlRewriter.__Dispatch_Table.rewrite(Ljava/lang/String;)Ljava/lang/String;
    //#input(String rewrite(String)): net/sourceforge/pebble/util/UrlRewriter.__Descendant_Table[net/sourceforge/pebble/util/HttpsURLRewriter]
    //#input(String rewrite(String)): net/sourceforge/pebble/util/UrlRewriter.__Descendant_Table[net/sourceforge/pebble/util/NullUrlRewriter]
    //#input(String rewrite(String)): net/sourceforge/pebble/util/UrlRewriter.__Descendant_Table[net/sourceforge/pebble/util/UrlRewriter]
    //#input(String rewrite(String)): net/sourceforge/pebble/util/UrlRewriter.__Descendant_Table[others]
    //#input(String rewrite(String)): net/sourceforge/pebble/util/UrlRewriter.__Dispatch_Table.rewrite(Ljava/lang/String;)Ljava/lang/String;
    //#input(String rewrite(String)): net/sourceforge/pebble/util/UrlRewriter.x
    //#input(String rewrite(String)): url
    //#output(String rewrite(String)): return_value
    //#pre[2] (String rewrite(String)): net/sourceforge/pebble/util/UrlRewriter.x != null
    //#post(String rewrite(String)): init'ed(return_value)
    //#unanalyzed(String rewrite(String)): Effects-of-calling:net.sourceforge.pebble.util.UrlRewriter$TheRewriter:get
    //#unanalyzed(String rewrite(String)): Effects-of-calling:rewrite
    //#unanalyzed(String rewrite(String)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(String rewrite(String)): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(String rewrite(String)): Effects-of-calling:net.sourceforge.pebble.Configuration:getSecureUrl
    //#unanalyzed(String rewrite(String)): Effects-of-calling:net.sourceforge.pebble.Configuration:getUrl
    //#unanalyzed(String rewrite(String)): Effects-of-calling:java.lang.String:replace
    //#urlfunctions.java:16: end of method: String net.sourceforge.pebble.web.tagext.UrlFunctions.rewrite(String)
	};

	public static String escape(String url) {
		return StringUtils.transformHTML(url); 
    //#urlfunctions.java:20: method: String net.sourceforge.pebble.web.tagext.UrlFunctions.escape(String)
    //#input(String escape(String)): url
    //#output(String escape(String)): return_value
    //#post(String escape(String)): init'ed(return_value)
    //#unanalyzed(String escape(String)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(String escape(String)): Effects-of-calling:java.lang.StringBuffer
    //#unanalyzed(String escape(String)): Effects-of-calling:java.lang.String:charAt
    //#unanalyzed(String escape(String)): Effects-of-calling:java.lang.StringBuffer:append
    //#unanalyzed(String escape(String)): Effects-of-calling:java.lang.StringBuffer:toString
    //#urlfunctions.java:20: end of method: String net.sourceforge.pebble.web.tagext.UrlFunctions.escape(String)
	};
}
    //#output(net.sourceforge.pebble.web.tagext.UrlFunctions__static_init): __Descendant_Table[net/sourceforge/pebble/web/tagext/UrlFunctions]
    //#post(net.sourceforge.pebble.web.tagext.UrlFunctions__static_init): __Descendant_Table[net/sourceforge/pebble/web/tagext/UrlFunctions] == &__Dispatch_Table
    //#urlfunctions.java:: end of method: net.sourceforge.pebble.web.tagext.UrlFunctions.net.sourceforge.pebble.web.tagext.UrlFunctions__static_init
    //#urlfunctions.java:: end of class: net.sourceforge.pebble.web.tagext.UrlFunctions
