 			continue
 		}
 
-		switch filter {
+		switch filter.lowercased() {
 		case "raw":
 			escapeMethod = "raw"
 		case "urlencode":

	var result: FilterAction = .ok
	var stringResult: String = ""
	let formatter = DateFormatter()
	var escapeMethod = "htmlencode"




		case "htmlencode":
			escapeMethod = "htmlencode"

		case "iso8601":
			formatter.locale = Locale(identifier: "en_US_POSIX")
			formatter.timeZone = TimeZone(secondsFromGMT: 0)
			formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"

		case "rfc2616":
			formatter.locale = Locale(identifier: "en_US_POSIX")
			formatter.dateFormat = "E, dd-MMM-YYY HH:mm:ss z"

		case "date":
			formatter.timeStyle = .none
