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. */ // Updated for PHP 7.2 by Petko Yotov www.pmwiki.org/petko //---------------------------------------------------------------------- ## [[hidden-email:target]] Markup('hidden-email',' hidden-email:target]] Markup('-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 = MarkupEscape($text); // extract the [= .. =] and temporarily store in $KPV[] $text = preg_replace_callback("/\\[\\[(.*?)mailto:([^\\s$UrlExcludeChars]*)(.*?)\\]\\]/", 'cb_eprotect_encode', $text); $text = MarkupRestore($text); // put the [= .. =] back in to the text $new['text'] = $text; } function cb_eprotect_encode($m) { return "[[".$m[1]."hidden-email:".trim(eProtectStrRecode($m[2])).$m[3]."]]"; }