constant SpamspanInterface::PATTERN_MAILTO in SpamSpan filter 8
Same name and namespace in other branches
- 8.2 src/SpamspanInterface.php \Drupal\spamspan\SpamspanInterface::PATTERN_MAILTO
Regex for mailto URLs.
See http://www.faqs.org/rfcs/rfc2368.html. This captures the whole mailto URL into the second group, the name into the third group and the domain into the fourth. Attributes before href go into first group and the ones after into fifth. The tag contents go into the sixth.
File
- src/
SpamspanInterface.php, line 53
Class
- SpamspanInterface
- Spamspan interface.
Namespace
Drupal\spamspanCode
const PATTERN_MAILTO = '!<a\\s+' . "((?:(?:[\\w|-]+\\s*=\\s*)(?:\\w+|\"[^\"]*\"|'[^']*')\\s*)*?)" . "href\\s*=\\s*(['\"])\\s*(mailto:" . self::PATTERN_MAIN . "(?:\\?[A-Za-z0-9_= %\\.\\-\\~\\_\\&;\\!\\*\\(\\)\\'#&]*)?\\s*)" . '\\2' . "((?:(?:\\s+[\\w|-]+\\s*=\\s*)(?:\\w+|\"[^\"]*\"|'[^']*'))*?)" . '>' . '(.*?)' . '</a>!ixs';