Separate the topic and attachment name filters, allow spaces in attachment names, remove colon from Topic names.

Motivation

See Item12560. Allowing a colon in a topic name will cause conflicts with Interwikis, and can create "unreachable" topics. However removing colon from NameFilter will also block them from attachments where they don't cause issues.

Description and Documentation

Split NameFilter into AttachmentNameFilter, then address the INCLUDE issue in Item12560

Also remove the \s space rejection from {AttachmentNameFilter}, so that spaces can be used in attachment names.

This also adds a configuration key: $Foswiki::cfg{AttachmentReplaceSpaces} which is disable by default. This Expert setting can be enabled to restore the prior functionality of replacing spaces wth underscores.

Examples

Impact

%WHATDOESITAFFECT%
edit

Implementation

-- Contributors: GeorgeClark - 18 Jul 2015

Discussion

Item12560 suggested additional enhancements that I've included in this implementation, but left in a feature branch for additional discussion:
  • Adds {AttachmentReplaceSpaces}, if enabled, restores 1.x foswiki behavior of replacing spaces with underscores.
  • Removes \s from the {AttachmentNameFilter}
  • Adds Colon (:) to the {NameFilter}

Item12560 branch is ready for merge.

-- GeorgeClark - 19 Nov 2015
 
Topic revision: r7 - 02 Dec 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy