public void escaped_symbols_are_replaced_with_double_backslash() { const string urlEncodedTitle = @"a title with-escaped symbols ?!%^&*()/\\"; var result = PathwayTitleUriParser.EscapeSymbols(urlEncodedTitle); Assert.AreEqual(@"a title with-escaped symbols \\?\\!\\%\\^\\&\\*\\(\\)\\/\\\\\\", result); }
public async Task <string> GetPathwaysNumbers(string pathwayTitle) { var pathwayNumberList = await _graphRepository.Client.Cypher .Match("(p:Pathway)") .Where(string.Format("p.title =~ \"(?i){0}\"", PathwayTitleUriParser.EscapeSymbols(pathwayTitle)), UseWhitelist) //case-insensitive query .Return(p => Return.As <string>("p.pathwayNo")) .ResultsAsync; var pathwayNumbers = pathwayNumberList as string[] ?? pathwayNumberList.ToArray(); return(!pathwayNumbers.Any() ? string.Empty : string.Join(",", pathwayNumbers.Distinct())); }