Revision 746
Added by doc over 16 years ago
trunk/CHANGELOG | ||
---|---|---|
12 | 12 |
|
13 | 13 |
------------------------------------- 2.7.0 ------------------------------------- |
14 | 14 |
11-Mar-2008 Christian Sommer |
15 |
# fixed issue with output filter (all .@ in descriptive mailto part: >xxxxx</a> were replaced; now restricted to emails) |
|
15 | 16 |
# fixed issue with WYSIWYG pages (appears if backend language and page frontend language differs) |
16 | 17 |
08-Mar-2008 Thomas Hornik |
17 | 18 |
# fixed issue with news and end-date |
trunk/wb/modules/output_filter/filter-routines.php | ||
---|---|---|
141 | 141 |
if(!in_array(OUTPUT_FILTER_MODE, array(2,3,6,7))) return $match[0]; |
142 | 142 |
|
143 | 143 |
// check if last part of the a href link: >xxxx</a> contains a email address we need to filter |
144 |
$pattern = '#\b[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}\b#i'; |
|
145 |
if(preg_match($pattern, $match[5])) { |
|
146 |
$match[5] = str_replace($search, $replace, $match[5]); |
|
144 |
$pattern = '#[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}#i'; |
|
145 |
if(preg_match_all($pattern, $match[5], $matches)) { |
|
146 |
foreach($matches as $submatch) { |
|
147 |
foreach($submatch as $value) { |
|
148 |
// replace all . and all @ in email address parts by (dot) and (at) strings |
|
149 |
$match[5] = str_replace($value, str_replace($search, $replace, $value), $match[5]); |
|
150 |
} |
|
151 |
} |
|
147 | 152 |
} |
148 | 153 |
|
149 | 154 |
// check if Javascript encryption routine is enabled |
Also available in: Unified diff
fixed issue with output filter (all .@ in descriptive mailto part: >xxxxx</a> were replaced; now restricted to emails)