 		{
 			arguments.key = arguments.key.key();
 		}
-		
+
 		// build the link
 		loc.returnValue = application.wheels.webPath & ListLast(cgi.script_name, "/");
 		if (Len(arguments.route))

					{
						loc.returnValue = loc.returnValue & "/" & loc.property; // add hard coded param from route
					}
				}		
			}
		}
		else
		{
			// link based on controller/action/key
			if (!Len(arguments.controller) && !Len(arguments.action))
				arguments.action = variables.params.action; // when no controller or action was passed in we link to the current page (controller/action only, not query string etc) by default
			if (!Len(arguments.controller))
				arguments.controller = variables.params.controller; // use the current controller as the default when none was passed in by the developer
			loc.returnValue = loc.returnValue & "?controller=" & REReplace(REReplace(arguments.controller, "([A-Z])", "-\l\1", "all"), "^-", "", "one");
			if (Len(arguments.action))
				loc.returnValue = loc.returnValue & "&action=" & REReplace(REReplace(arguments.action, "([A-Z])", "-\l\1", "all"), "^-", "", "one");

	<cfargument name="port" type="numeric" required="false" default="#application.wheels.functions.URLFor.port#" hint="Set this to override the current port number">
	<cfscript>
		var loc = {};
		loc.params = {};
		if (structkeyexists(variables, "params"))
			structappend(loc.params, variables.params, true);
		if (application.wheels.environment != "production")
		{
			if (arguments.onlyPath && (Len(arguments.host) || Len(arguments.protocol)))
