From 29db6f17f9c9e408f3d71eba24d0ff5844410df4 Mon Sep 17 00:00:00 2001 From: petko Date: Mon, 19 Aug 2024 03:45:59 +0000 Subject: Add $EnableObfuscateEmails, $EnablePreserveLineBreaks. git-svn-id: svn://pmwiki.org/pmwiki/trunk@4781 524c5546-5005-0410-9a3e-e25e191bd360 --- scripts/stdconfig.php | 2 +- scripts/stdmarkup.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/stdconfig.php b/scripts/stdconfig.php index 058cd6a0..6ba4f5ad 100644 --- a/scripts/stdconfig.php +++ b/scripts/stdconfig.php @@ -45,7 +45,7 @@ while(count($PostConfig)) { if (IsEnabled($EnableCommonEnhancements,0)) { # Security + review changes SDV($EnableCookieHTTPOnly, 1); - SDVA($LinkFunctions, array('mailto:' => 'ObfuscateLinkIMap')); + SDV($EnableObfuscateEmails, 1); SDV($EnableRCDiffBytes, 1); SDV($EnableLocalTimes, 3); diff --git a/scripts/stdmarkup.php b/scripts/stdmarkup.php index 4abff4d8..2b46faaf 100644 --- a/scripts/stdmarkup.php +++ b/scripts/stdmarkup.php @@ -18,6 +18,12 @@ Script maintained by Petko YOTOV www.pmwiki.org/petko */ +## for simpler configuration +if (IsEnabled($EnableObfuscateEmails, 0)) + $LinkFunctions['mailto:'] = 'ObfuscateLinkIMap'; +if (IsEnabled($EnablePreserveLineBreaks, 0)) + $HTMLPNewline = '
'; + ## first we preserve text in [=...=] and [@...@] function PreserveText($sigil, $text, $lead) { if ($sigil=='=') return $lead.Keep($text); -- cgit v1.2.3