Skip to content

Commit fd2e273

Browse files
authored
fix:deal with the hash sign (#1530)
1 parent f30363f commit fd2e273

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

client/src/components/ContentNavigator/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
import { isContainer as getIsContainer } from "./utils";
3333

3434
const fileValidator = (value: string): string | null =>
35-
/^([^/<>;\\{}?#]+)\.\w+$/.test(
35+
/^([^/<>;\\{}?]+)\.\w+$/.test(
3636
// file service does not allow /, <, >, ;, \, {, } while vscode does not allow ? and #
3737
value,
3838
)

client/src/connection/rest/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ export const resourceType = (item: ContentItem): string | undefined => {
9898
export const getSasContentUri = (item: ContentItem, readOnly?: boolean): Uri =>
9999
Uri.parse(
100100
`${readOnly ? `${ContentSourceType.SASContent}ReadOnly` : ContentSourceType.SASContent}:/${
101-
item.name
101+
item.name ? item.name.replace("#", "%23") : item.name
102102
}?id=${getResourceIdFromItem(item)}`,
103103
);
104104

105105
export const getSasServerUri = (item: ContentItem, readOnly?: boolean): Uri =>
106106
Uri.parse(
107107
`${readOnly ? `${ContentSourceType.SASServer}ReadOnly` : ContentSourceType.SASServer}:/${
108-
item.name
108+
item.name ? item.name.replace("#", "%23") : item.name
109109
}?id=${getResourceIdFromItem(item)}`,
110110
);
111111

0 commit comments

Comments
 (0)