What's wrong
The #114 fix stops DotNet.Glob treating slashes as path separators. It does this by masking them in both the pattern and the text before matching (TextFilter/TextFilter.cs ~lines 405–415 at c4eec7b):
private const char MaskedPathSeparator = '\uE000';
private static string MaskPathSeparators(string value) =>
value.Replace('/', MaskedPathSeparator).Replace('\\', MaskedPathSeparator);
Both / and \ map to the same private-use character, so after masking the glob can no longer tell them apart.
Reproduction (observed on net10.0)
TextFilter.Filter(["C:\\temp\\x", "1/2", "1\\2"], "1/2", TextFilterType.Glob);
// actual: ["1/2", "1\\2"] expected: ["1/2"]
TextFilter.IsMatch("a\\b", "a/b", TextFilterType.Glob, TextFilterMatchOptions.ByWholeString);
// actual: true expected: false
TextFilter.Filter(["C:\\temp", "http://x", "plain"], "-*/*", TextFilterType.Glob);
// actual: ["plain"] expected: ["C:\\temp", "plain"]
Why it matters
The masking exists because "a slash is an ordinary character" in arbitrary text. The side effect is that the two slashes are now interchangeable. A user who excludes URLs with -*/* also loses every Windows path. Filtering for and/or or 1/2 also shows backslash variants. Regex and plain-text filtering don't do this, so the result depends on which filter type is selected.
Suggested fix / acceptance criteria
What's wrong
The #114 fix stops DotNet.Glob treating slashes as path separators. It does this by masking them in both the pattern and the text before matching (
TextFilter/TextFilter.cs~lines 405–415 at c4eec7b):Both
/and\map to the same private-use character, so after masking the glob can no longer tell them apart.Reproduction (observed on net10.0)
Why it matters
The masking exists because "a slash is an ordinary character" in arbitrary text. The side effect is that the two slashes are now interchangeable. A user who excludes URLs with
-*/*also loses every Windows path. Filtering forand/oror1/2also shows backslash variants. Regex and plain-text filtering don't do this, so the result depends on which filter type is selected.Suggested fix / acceptance criteria
/and\to two distinct private-use characters (e.g.\uE000and\uE001), applied identically to the pattern and the text.*and?never match across/or\, so any item containing a slash is filtered out #114 tests (wildcards crossing/and\) still pass.