MailtoSanitizer
Simple utility for transformation sanitized email in mailto element.
Instalation
Bower
bower install mailto-sanitizer
Npm
npm install mailto-sanitizer
Usage
Default behavior
replaceMethod replaces string a (at) and (dot) are replaced with @ and .
var sanitizer = ; var mailto = sanitizer;console; // <a href="mailto:name@domain.cz">name@domain.cz</a>
Configurable replacements
At and dot replacements can be configured with constructor parameters.
var sanitizer = 'zavináč' 'tečka'; var mailto = sanitizer;console; // <a href="mailto:name@domain.cz">name@domain.cz</a>
Example with element replacement
angular(zavináč)angular(tečka)cz
var sanitizer = "zavináč" "tečka";var text = ;