Minor change to filter()

  • Francis Turner

    Francis Turner - 2008-11-24

    The requirement is to allow - in page names and links. Currently [this-that] doesn't work. Neither does [this-that|explanation of this-that].

    Both should link to a wiki page entitled 'this-that'.

    The following changes to regexes in filter() fix this:

    1) Approx line 444 (3rd line after // [ url | link ] outlinks)
        $filtered=preg_replace("/\[([\w\.\:\~@\?~\%=\+\-\/]+)\|([\w -]+)\]/i","<a href=\&quot;index.php?$wiki_get=\\1\&quot;>\\2</a>", $filtered);

    2) Arprox line 465 ( line after    // []'ed words
        $filtered=preg_replace("/\[([\w\s-]+)\]/","<a href=\&quot;index.php?$wiki_get=\\1\&quot;>\\1</a>", $filtered);

  • devclined

    devclined - 2011-02-20

    * Wikepage used  type links whish used '_' as whitespace. For make a new page just make a link in a page like  and then save and use the link. When you use link, page'll created.


Log in to post a comment.