diff --git a/zero/Utils/Safenames.cs b/zero/Utils/Safenames.cs index bafd37f5..bcef4901 100644 --- a/zero/Utils/Safenames.cs +++ b/zero/Utils/Safenames.cs @@ -15,10 +15,6 @@ public class Safenames const char DOT = '.'; - const char PLUS = '+'; - - const char AMPERSAND = '&'; - static char[] TICKS = new char[3] { '`', '\'', 'ยด' }; @@ -94,11 +90,7 @@ public class Safenames { target = character; } - // + sign for + and & - else if (character == PLUS || character == AMPERSAND) - { - target = PLUS; - } + // - sign for + and & else if (scope == Scope.File && character == DOT) { target = DOT; @@ -110,24 +102,15 @@ public class Safenames } // add default characters - if (target != HYPHEN && target != PLUS) + if (target != HYPHEN) { output.Append(target); } // add hyphen if it isn't first and previous char is not + or - - else if (target == HYPHEN && previous != default(char) && previous != PLUS && previous != HYPHEN) + else if (target == HYPHEN && previous != default(char) && previous != HYPHEN) { output.Append(target); } - // add plus. do remove hyphen it is the previous character - else if (target == PLUS) - { - if (previous == HYPHEN) - { - output.Remove(output.Length - 1, 1); - } - output.Append(target); - } if (output.Length > 0) {