- Timestamp:
- Feb 13, 2020 4:49:10 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Utilities.inc.php
r707 r715 279 279 // Capture the full URL into the first match and only the first X characters into the second match. 280 280 // This will match URLs not preceded by " ' or = (URLs inside an attribute) or ` (Markdown quoted) or double-scheme (http://http://www.asdf.com) 281 // Valid URL characters: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=281 // https://stackoverflow.com/questions/1547899/which-characters-make-a-url-invalid/1547940#1547940 282 282 $regex = '@ 283 283 \b # Start with a word-boundary. … … 1370 1370 $addr_binary = sprintf('%032b', ip2long($addr)); 1371 1371 foreach ($networks as $network) { 1372 if ( preg_match('![\d\.]{7,15}/\d{1,2}!', $network)) {1372 if (mb_strpos($network, '/') !== false) { 1373 1373 // IP is in CIDR notation. 1374 1374 list($cidr_ip, $cidr_bitmask) = explode('/', $network);
Note: See TracChangeset
for help on using the changeset viewer.