Skip to content

Commit 2f388b3

Browse files
authored
Fixes #17614 (#17687)
1 parent 380f3f7 commit 2f388b3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Umbraco.Web.UI.Client/src/packages/templating/local-components/insert-menu/insert-menu.element.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ export class UmbTemplatingInsertMenuElement extends UmbLitElement {
3737

3838
switch (type) {
3939
case CodeSnippetType.partialView: {
40-
this.value = getInsertPartialSnippet(value);
40+
const regex = /^%2F|%25dot%25cshtml$/g;
41+
const prettyPath = value.replace(regex, '').replace(/%2F/g, '/');
42+
this.value = getInsertPartialSnippet(prettyPath);
4143
this.#dispatchInsertEvent();
4244
break;
4345
}

src/Umbraco.Web.UI.Client/src/packages/templating/modals/templating-item-picker/templating-item-picker-modal.element.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ export class UmbTemplatingItemPickerModalElement extends UmbModalBaseElement<
5353

5454
if (!value) return;
5555

56-
const regex = /^%2F|%25dot%25cshtml$/g;
57-
const prettyPath = value.replace(regex, '').replace(/%2F/g, '/');
5856
this.value = {
59-
value: prettyPath,
57+
value: value,
6058
type: CodeSnippetType.partialView,
6159
};
6260
this.modalContext?.submit();

0 commit comments

Comments
 (0)