Skip to content

Commit

Permalink
added catch to test
Browse files Browse the repository at this point in the history
  • Loading branch information
samsmithnz committed Jun 21, 2023
1 parent 7694ffb commit dd9f5d6
Showing 1 changed file with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,26 @@ public async Task<bool> SaveItem(AzureStorageTableModel data)

public static string EncodePartitionKey(string text)
{
//The forward slash(/) character
//The backslash(\) character
//The number sign(#) character
//The question mark (?) character
text = text.Replace("/", "_");
//text = text.Replace("\\", "_");
//text = text.Replace("#", "_");
//text = text.Replace("?", "_");

////Control characters from U+0000 to U+001F, including:
////The horizontal tab(\t) character
//text = text.Replace("\t", "_");
////The linefeed(\n) character
//text = text.Replace("\n", "_");
////The carriage return (\r) character
//text = text.Replace("\r", "_");
////Control characters from U + 007F to U+009F
if (string.IsNullOrEmpty(text) == false)
{
//The forward slash(/) character
//The backslash(\) character
//The number sign(#) character
//The question mark (?) character
text = text.Replace("/", "_");
//text = text.Replace("\\", "_");
//text = text.Replace("#", "_");
//text = text.Replace("?", "_");

////Control characters from U+0000 to U+001F, including:
////The horizontal tab(\t) character
//text = text.Replace("\t", "_");
////The linefeed(\n) character
//text = text.Replace("\n", "_");
////The carriage return (\r) character
//text = text.Replace("\r", "_");
////Control characters from U + 007F to U+009F
}

return text;
}
Expand Down

0 comments on commit dd9f5d6

Please sign in to comment.