From 9af363345776c36dc55af5b04acd50e1f7590a0e Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Wed, 5 Dec 2007 06:09:25 -0500 Subject: [PATCH] redirect() allows ./ profix, metaform uses tinymce, not fckeditor --- http.php | 7 +++++-- metaform/template.html | 36 ++++++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/http.php b/http.php index 94dbff1..e325fc1 100644 --- a/http.php +++ b/http.php @@ -59,13 +59,16 @@ function this_url() { # $url can be: # 1) a full URL # 2) an absolute path -# 3) a filename (you can pass a directory/file.html and such, but "../" prefix is not supported) +# 3) a filename (you can pass a directory/file.html and such, but "../" prefix is not supported yet) function redirect($url, $status = '302 Moved Temporarily', $message = '') { if(!strpos($url, ':')) { + while(substr($url, 0, 2) == './') { + $url = substr($url, 2); + } if(substr($url, 0, 1) == '/') { $url = this_url_sans_path() . $url; } else { - $url = ereg_replace('/[^/]*([?].*)?$', "/$url", this_url()); + $url = ereg_replace('/[^/]*$', "/$url", this_url()); } } diff --git a/metaform/template.html b/metaform/template.html index cabd660..4b6586f 100644 --- a/metaform/template.html +++ b/metaform/template.html @@ -4,17 +4,29 @@ ~form_name~ entry - - - + @@ -36,7 +48,7 @@
- +
~caption.html~: ~caption.html~: ~caption.html~: dd/mm/yy~caption.html~: ~caption.html~: ~caption.html~:
~caption.html~: ~caption.html~: ~caption.html~: ~caption.html~? ~caption.html~?
~caption.html~: ~caption.html~: ~caption.html~: dd/mm/yy~caption.html~: ~caption.html~: ~caption.html~:
~caption.html~: ~caption.html~: ~caption.html~: ~caption.html~? ~caption.html~?
-- 1.7.10.4