Skip to content

Commit 50ff23b

Browse files
authored
Don't assume HtmlString when inserting default values in templates (#18144)
1 parent 30c4408 commit 50ff23b

File tree

1 file changed

+1
-1
lines changed
  • src/Umbraco.Web.UI.Client/src/packages/templating/utils

1 file changed

+1
-1
lines changed

src/Umbraco.Web.UI.Client/src/packages/templating/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const getUmbracoFieldSnippet = (field: string, defaultValue: string | nul
4545

4646
const value = `${field !== null ? `@Model.Value("${field}"` : ''}${
4747
fallback !== null ? `, fallback: ${fallback}` : ''
48-
}${defaultValue !== null ? `, defaultValue: new HtmlString("${defaultValue}")` : ''}${field ? ')' : ')'}`;
48+
}${defaultValue !== null ? `, defaultValue: (object)"${defaultValue}"` : ''}${field ? ')' : ')'}`;
4949

5050
return value;
5151
};

0 commit comments

Comments
 (0)