From: Jason Woofenden Date: Thu, 14 Jun 2007 04:03:04 +0000 (-0400) Subject: added dwt_append_raw(), format_filename() converts ^[.-] to _ instead of removing... X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=commitdiff_plain;h=651c6826f68583dcd7c7ddfb5b02f14bcf2200d8 added dwt_append_raw(), format_filename() converts ^[.-] to _ instead of removing all of them --- diff --git a/dwt.php b/dwt.php index 78daa54..d07abd8 100644 --- a/dwt.php +++ b/dwt.php @@ -61,15 +61,19 @@ function dwt_find($name) { return dwt_find_raw(""); } -function dwt_append($name, $value) { - $index = dwt_find($name); +function dwt_append_raw($name, $value) { + $index = dwt_find_raw($name); if($index !== null) { $GLOBALS['_dwt_values'][$index] .= $value; } else { - dwt_set($name, $value); + dwt_set_raw($name, $value); } } +function dwt_append($name, $value) { + dwt_append_raw("", $value); +} + function dwt_output($filename = null) { if($filename !== null) { dwt_load($filename); diff --git a/format.php b/format.php index 1bac609..1fc74af 100644 --- a/format.php +++ b/format.php @@ -33,7 +33,7 @@ function format_zip($str) { function format_filename($str) { $str = strtolower($str); $str = ereg_replace('[^a-z0-9_.-]', '_', $str); - return ereg_replace('^[0-9.-]*', '', $str); + return ereg_replace('^[.-]', '_', $str); } function format_varname($str) { diff --git a/messages.php b/messages.php index 8d8196d..326ed16 100644 --- a/messages.php +++ b/messages.php @@ -43,12 +43,12 @@ # Full-featured example: # # -#
+#
# # #
# -#

~message_text.html~

+#

~message_text.html~

# #
#