Revision 1534
Added by darkviper over 12 years ago
filter-routines.php | ||
---|---|---|
89 | 89 |
create_function('$matches', |
90 | 90 |
'$retval = $matches[0]; '. |
91 | 91 |
'$h = parse_url($matches[2], PHP_URL_HOST); '. |
92 |
'if(stripos(WB_URL, $h) !== false) { '.
|
|
93 |
'$a = parse_url($matches[2]); '.
|
|
94 |
'$p = (isset($a[\'path\']) ? $a[\'path\'] : \'\'); '.
|
|
95 |
'$q = (isset($a[\'query\']) ? \'?\'.$a[\'query\'] : \'\'); '.
|
|
96 |
'$f = (isset($a[\'fragment\']) ? \'#\'.$a[\'fragment\'] : \'\'); '.
|
|
97 |
'$p .= ($q.$f); '.
|
|
98 |
'$retval = $matches[1]."/".(isset($p) ? ltrim(str_replace("//", "/", $p), "/") : "").$matches[3]; '.
|
|
99 |
'} '.
|
|
100 |
'return $retval;'),
|
|
92 |
'if(isset($h) && $h != \'\') { '.
|
|
93 |
'if(stripos(WB_URL, $h) !== false) { '.
|
|
94 |
'$a = parse_url($matches[2]); '.
|
|
95 |
'$p = (isset($a[\'path\']) ? $a[\'path\'] : \'\'); '.
|
|
96 |
'$q = (isset($a[\'query\']) ? \'?\'.$a[\'query\'] : \'\'); '.
|
|
97 |
'$f = (isset($a[\'fragment\']) ? \'#\'.$a[\'fragment\'] : \'\'); '.
|
|
98 |
'$p .= ($q.$f); '.
|
|
99 |
'$retval = $matches[1]."/".(isset($p) ? ltrim(str_replace("//", "/", $p), "/") : "").$matches[3]; '.
|
|
100 |
'}} return $retval;'),
|
|
101 | 101 |
$content); |
102 | 102 |
return $content; |
103 | 103 |
} |
Also available in: Unified diff
filter-routines.php rel-URL Filter fixed for mailto-links