Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
64d7a8b
)
Merge branch 'master' of git@github.com:JasonWoof/wfpl
author
Jason Woofenden
<jason283@herkamire.com>
Fri, 21 Nov 2008 02:51:33 +0000
(21:51 -0500)
committer
Jason Woofenden
<jason283@herkamire.com>
Fri, 21 Nov 2008 02:51:33 +0000
(21:51 -0500)
format.php
patch
|
blob
|
history
diff --git
a/format.php
b/format.php
index
395835d
..
f395491
100644
(file)
--- a/
format.php
+++ b/
format.php
@@
-156,8
+156,14
@@
function format_email($str) {
}
function format_url($str) {
- # FIXME
- return format_oneline($str);
+ # FIXME check for TLD? encode special chars?
+ $str = trim(format_oneline($str));
+ if($str !== '') {
+ if(strpos($str, ':') === false) {
+ $str = 'http://' . $str;
+ }
+ }
+ return $str;
}
function format_money($str, $display_cents = true) {