Changeset 1366:e0577ae710f5
- Timestamp:
- 08/13/13 15:05:35 (10 years ago)
- Branch:
- Ticket1526-depuis2.5
- Children:
- 1367:ef0eda092a94, 1400:739ac39d1d51
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/antispam/filters/class.dc.filter.linkslookup.php
r1179 r1366 64 64 private function getLinks($text) 65 65 { 66 $res = array(); 67 68 # href attribute on "a" tags 69 if (preg_match_all('/<a ([^>]+)>/ms', $text, $match, PREG_SET_ORDER)) 70 { 71 for ($i = 0; $i<count($match); $i++) 72 { 73 if (preg_match('/href="(http:\/\/[^"]+)"/ms', $match[$i][1], $matches)) { 74 $res[] = $matches[1]; 75 } 76 } 77 } 78 79 return $res; 66 // href attribute on "a" tags is second match 67 preg_match_all('|<a.*?href="(http.*?)"|', $text, $parts); 68 69 return $parts[1]; 80 70 } 81 71 }
Note: See TracChangeset
for help on using the changeset viewer.