Changeset 218190
- Timestamp:
- 03/16/2010 05:20:05 AM (16 years ago)
- Location:
- emoba-email-obfuscator-advanced/trunk
- Files:
-
- 2 edited
-
emoba.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
emoba-email-obfuscator-advanced/trunk/emoba.php
r218185 r218190 59 59 define ("LEGACY", false); 60 60 61 62 61 /**** 63 62 Here we designate the symbols used for at/dot separators in the displayed email addresses. 64 You may want to change the alts or i18n them , or choose different symbols.63 You may want to change the alts or i18n them. 65 64 ****/ 66 65 if (true == GLYPHS) { … … 98 97 } 99 98 99 100 100 /**** 101 101 This is the RE expression for detecting email addresses. 102 102 ****/ 103 103 define( "EMAIL", "([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})" ); 104 104 105 105 106 /**** … … 120 121 } 121 122 122 /**** 123 Insert the JavaScript needed to create the email link and popup 123 124 /**** 125 The JavaScript for creating the email link and popup 124 126 ****/ 125 127 function emoba_addJScript($email, $ename, $id) { … … 148 150 149 151 $content = preg_replace_callback( 150 '!<a(?:.*)href="mailto:' .EMAIL. '([ ^"]*)"[^>]*>(.+)</a>!i',152 '!<a(?:.*)href="mailto:' .EMAIL. '([?][^"]*)"[^>]*>(.+)</a>!i', 151 153 create_function( 152 154 '$match', … … 170 172 // Allows any number of spaces at each position within [EMAIL|] 171 173 $content = preg_replace_callback( 172 '!\[EMAIL(?:[\s]| )*([^|]+)(?:(?:[\s]| )*[|](?:[\s]| )*)'.EMAIL.'( ?:[\s]| )*]!',173 create_function( 174 '$match', 175 '$em_email = $match[2] ;174 '!\[EMAIL(?:[\s]| )*([^|]+)(?:(?:[\s]| )*[|](?:[\s]| )*)'.EMAIL.'([?][^]]*?)(?:[ ]| )*]!', 175 create_function( 176 '$match', 177 '$em_email = $match[2].$match[3]; 176 178 $em_name = emoba_symb_email($match[1]); 177 179 $id = "emoba-" . rand(1000, 9999); -
emoba-email-obfuscator-advanced/trunk/readme.txt
r218185 r218190 18 18 * standard email links (`<a href="mailto:[email protected]">Name</a>`), allowing (but ignoring) additional attributes both before and after the href attribute, and allowing a subject using the syntax `mailto:[email protected]?subject=...`. 19 19 20 * the special "easy to write" form `[EMAIL Name | [email protected]]` (changed from the earlier versions' much more fragile `[Name] [email protected]`, which remains available via the LEGACY flag)20 * the special "easy to write" form `[EMAIL Name | [email protected]]`, also allowing the `?subject=... ]` syntax. (Earlier versions' much more fragile `[Name] [email protected]` remains available if the LEGACY flag is true.) 21 21 22 * a bare email address `[email protected]` (with or without "mailto:" in front of it )22 * a bare email address `[email protected]` (with or without "mailto:" in front of it; `?subject=` syntax not allowed here) 23 23 24 24 These will all appear as active email links displaying "Name". In the cases of a bare email link (one which has no Name) or a link in which the Name is the email itself, the link will show as the email displayed in human-readable form, eg `you [@] example [.] com`, where the [@] and [.] are text symbols or graphic images to hide them from spambots. … … 46 46 47 47 = 1.5 = 48 2010/03/16 Using graphics in email obfuscation (`GLYPHS=true`) no longer causes xhtml validation errors. 48 2010/03/16 Using graphics in email obfuscation (`GLYPHS=true`) no longer causes xhtml validation errors. `?subject=` syntax allowed in `[EMAIL | ]` form. 49 49 = 1.4 = 50 50 2010/03/09 Bugfix: now correctly allows extended email syntax "email?subject=yyy". Bugfix: now correctly allows extra spaces within shortcode [EMAIL | ]. Email link may exhibit email: `<a href="mailto:[email protected]">[email protected]</a>`; the exhibited email will be obfuscated.
Note: See TracChangeset
for help on using the changeset viewer.