mailto:...]] Jan 7 2005 - * Moved decoding script to Header, due to problem, when SideBar and Main Text contains addresses to decode (Klonk) Nov 17 2004 - * Calling the decoding function as Custom Markup for PmWiki2 (by Klonk) * made decoding of [[hidden-email:...]] working BONUS: [[hidden-email:... |DisplayedText]] works also now * added class='urllink' to decoded output for same CSS formating as for other links in PmWiki2 * inserted own function call in array $EditFunctions before 'ReplaceOnSave' May 11, 2004 - Working Beta. Still a few improvements to be made, but the script is ready for public testing. Please feel free to email me your comments/suggestions. Thanks! May 8, 2004 - Alpha release. Not released to public. * Configuration * There aren't (yet) any configuration variables for this script. */ //---------------------------------------------------------------------- ## [[hidden-email:target]] Markup_e('hidden-email',' hidden-email:target]] Markup_e('-hidden-email','$email\");" . "\n//-->\n"; else $html .= "" . $AlternateText . ""; $html .= "\n\n"; return Keep($html); } //---------------------------------------------------------------------- function eProtectEncode ($pagename,&$page,&$new) { //---------------------------------------------------------------------- global $KeepToken, $KPV, $UrlExcludeChars; if (!@$_POST['post']) return; // only Encode, when posting $text = $new['text']; $text = preg_replace_callback("/\\[\\=(.*?)\\=\\]/s", create_function('$str', 'return Keep($str[0]);'), $text); // extract the [= .. =] and temporarily store in $KPV[] # $text = preg_replace_callback("/\\[\\[mailto:([^\\s$UrlExcludeChars]*)/", create_function('$m','return "[[hidden-email:".trim(eProtectStrRecode($m[1]));'), $text); $text = preg_replace_callback("/\\[\\[(.*?)mailto:([^\\s$UrlExcludeChars]*)(.*?)\\]\\]/", create_function('$m','return "[[".$m[1]."hidden-email:".trim(eProtectStrRecode($m[2])).$m[3]."]]";'), $text); $text = preg_replace("/$KeepToken(\\d+)$KeepToken/e",'$KPV[$1]',$text); // put the [= .. =] back in to the text $new['text'] = $text; } ?>