Plugin Directory

Changeset 218190


Ignore:
Timestamp:
03/16/2010 05:20:05 AM (16 years ago)
Author:
kirkpatrick
Message:

1.4

Location:
emoba-email-obfuscator-advanced/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • emoba-email-obfuscator-advanced/trunk/emoba.php

    r218185 r218190  
    5959define ("LEGACY", false);
    6060
    61 
    6261/****
    6362Here 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.
     63You may want to change the alts or i18n them.
    6564****/
    6665if (true == GLYPHS) {
     
    9897}
    9998
     99
    100100/****
    101101This is the RE expression for detecting email addresses.
    102102****/
    103103define( "EMAIL", "([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})" );
     104
    104105
    105106/****
     
    120121}
    121122
    122 /****
    123 Insert the JavaScript needed to create the email link and popup
     123
     124/****
     125The JavaScript for creating the email link and popup
    124126****/
    125127function emoba_addJScript($email, $ename, $id) {
     
    148150
    149151  $content = preg_replace_callback(
    150     '!<a(?:.*)href="mailto:' .EMAIL. '([^"]*)"[^>]*>(.+)</a>!i',
     152    '!<a(?:.*)href="mailto:' .EMAIL. '([?][^"]*)"[^>]*>(.+)</a>!i',
    151153    create_function(
    152154      '$match',
     
    170172//     Allows any number of spaces at each position within [EMAIL|]
    171173  $content = preg_replace_callback(
    172     '!\[EMAIL(?:[\s]|&nbsp;)*([^|]+)(?:(?:[\s]|&nbsp;)*[|](?:[\s]|&nbsp;)*)'.EMAIL.'(?:[\s]|&nbsp;)*]!',
    173     create_function(
    174       '$match',
    175             '$em_email = $match[2];
     174    '!\[EMAIL(?:[\s]|&nbsp;)*([^|]+)(?:(?:[\s]|&nbsp;)*[|](?:[\s]|&nbsp;)*)'.EMAIL.'([?][^]]*?)(?:[ ]|&nbsp;)*]!',
     175    create_function(
     176      '$match',
     177            '$em_email = $match[2].$match[3];
    176178            $em_name = emoba_symb_email($match[1]);
    177179            $id = "emoba-" . rand(1000, 9999);
  • emoba-email-obfuscator-advanced/trunk/readme.txt

    r218185 r218190  
    1818 * 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=...`. 
    1919
    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.
    2121
    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
    2323
    2424These 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.
     
    4646
    4747= 1.5 =
    48 2010/03/16 Using graphics in email obfuscation (`GLYPHS=true`) no longer causes xhtml validation errors.
     482010/03/16 Using graphics in email obfuscation (`GLYPHS=true`) no longer causes xhtml validation errors. `?subject=` syntax allowed in `[EMAIL | ]` form.
    4949= 1.4 =
    50502010/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.