Revision 685
Added by doc almost 18 years ago
| trunk/CHANGELOG | ||
|---|---|---|
| 12 | 12 |
|
| 13 | 13 |
------------------------------------- 2.7.0 ------------------------------------- |
| 14 | 14 |
09-Feb-2008 Christian Sommer |
| 15 |
# output_filter: fixed bug in regular expression (eats up characters in mailto links) |
|
| 15 | 16 |
# output_filter: removed word boundary from mailto regex part |
| 16 | 17 |
# fixed bug in menu_link module (IE 7 did not show the select boxes at all) |
| 17 | 18 |
# fixed bug in user signup |
| trunk/wb/modules/output_filter/filter-routines.php | ||
|---|---|---|
| 89 | 89 |
define('OUTPUT_FILTER_DOT_REPLACEMENT', $filter_settings['dot_replacement']);
|
| 90 | 90 |
|
| 91 | 91 |
// first search part to find all mailto email addresses |
| 92 |
$pattern = '#(<a.*?href\s*?=\s*?"\s*?mailto\s*?:\s*?)([A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4})([^"]*?)"([^>]*>)(.*?)</a>';
|
|
| 92 |
$pattern = '#(<a[^<]*href\s*?=\s*?"\s*?mailto\s*?:\s*?)([A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4})([^"]*?)"([^>]*>)(.*?)</a>';
|
|
| 93 | 93 |
// second part to find all non mailto email addresses |
| 94 | 94 |
$pattern .= '|\b([A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4})\b#i';
|
| 95 | 95 |
/* |
| 96 |
Sub 1:\b(<a.*?href\s*?=\s*?"\s*?mailto\s*?:\s*?) --> "<a id="yyy" class="xxx" href = " mailto :" ignoring white spaces
|
|
| 96 |
Sub 1:\b(<a.[^<]*href\s*?=\s*?"\s*?mailto\s*?:\s*?) --> "<a id="yyy" class="xxx" href = " mailto :" ignoring white spaces
|
|
| 97 | 97 |
Sub 2:([A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}) --> the email address in the mailto: part of the mail link
|
| 98 | 98 |
Sub 3:([^"]*?)" --> possible ?Subject&cc... stuff attached to the mail address |
| 99 | 99 |
Sub 4:([^>]*>) --> all class or id statements after the mailto but before closing ..> |
Also available in: Unified diff
output_filter: fixed bug in regular expression (eats up characters in mailto links)