Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wrote upload handler (untested
[wfpl.git]
/
format.php
diff --git
a/format.php
b/format.php
index
b9270bd
..
fc04b1b
100644
(file)
--- a/
format.php
+++ b/
format.php
@@
-22,6
+22,11
@@
# This file contains basic encodings
# This file contains basic encodings
+function format_int($str) {
+ $str = ereg_replace('[^0-9]', '', $str);
+ return ereg_replace('^0*([1-9])', '\1', $str);
+}
+
function format_oneline($str) {
$str = str_replace("\r", '', $str);
return str_replace("\n", '', $str);
function format_oneline($str) {
$str = str_replace("\r", '', $str);
return str_replace("\n", '', $str);
@@
-44,6
+49,11
@@
function format_email($str) {
return format_oneline($str);
}
return format_oneline($str);
}
+function format_url($str) {
+ # FIXME
+ return format_oneline($str);
+}
+
function format_money($str, $display_cents = true) {
$str = ereg_replace('[^0-9.]', '', $str);
if($display_cents) {
function format_money($str, $display_cents = true) {
$str = ereg_replace('[^0-9.]', '', $str);
if($display_cents) {