[pmwiki-users] Retain markup expressions inside input and textareas
design5 at softflow.co.uk
Mon Dec 29 03:49:42 CST 2008
Sunday, December 28, 2008, 4:30:27 AM, Petko Yotov wrote:
> If you really want to allow directives with "(:" and ":)" in posts of PmForm,
> you can define another "PTV Pattern", and remove the existing one:
> unset($PmFormPostPatterns); # or each one individually
> $PageTextVarPatterns['(==var:...==)'] =
> '/(\\(== *(\\w[-\\w]*) *:(?!\\))\\s?)(.*?)(==\\))/s';
> Thus, your multiline PageTextVariables will be stored in fields like this:
Dave, I don't know if this is of use to you:
FoxForum (in foxforum.php) uses a custom PTV markup
(::var:multiline value::) for posting text area content
including directives as a PTV.
Defined like this:
# add new PTV pattern for text PTV (::var:...::)
'/(\\(:: *(\\w[-\\w]*) *:(?!\\))\\s?)(.*?)(::\\))/s';
The PTV pattern (:var:value:) is not unset, to stay useful.
Security is dealt with within Fox by setting a variable
$EnablePostDirectives = true;
If it is false, the default, Fox will "defuse" any directives found in variables
posted (similar to adding an extra space).
See also function FoxDefuseItem in fox.php
Hope this helps, nothing more frustrating than to abandon efforts
after days of work!
Happy New Year to all of you!
More information about the pmwiki-users