diff --git a/web/app/components/plugins/marketplace/list/template-card.tsx b/web/app/components/plugins/marketplace/list/template-card.tsx index da651b56e4..414293062c 100644 --- a/web/app/components/plugins/marketplace/list/template-card.tsx +++ b/web/app/components/plugins/marketplace/list/template-card.tsx @@ -43,9 +43,12 @@ const TemplateCardComponent = ({ templateId: id, creationType: 'templates', } + const encodedPublisherHandle = encodeURIComponent(publisher_handle) + const encodedTemplateName = encodeURIComponent(template_name) + return includeSource - ? getMarketplaceUrl(`/template/${publisher_handle}/${template_name}`, queryParams) - : `${MARKETPLACE_URL_PREFIX}/template/${publisher_handle}/${template_name}?${buildSearchParamsString(queryParams)}` + ? getMarketplaceUrl(`/template/${encodedPublisherHandle}/${encodedTemplateName}`, queryParams) + : `${MARKETPLACE_URL_PREFIX}/template/${encodedPublisherHandle}/${encodedTemplateName}?${buildSearchParamsString(queryParams)}` }, [publisher_handle, template_name, theme, locale, id, includeSource]) const visibleDepsPlugins = deps_plugins?.slice(0, MAX_VISIBLE_DEPS_PLUGINS) || [] diff --git a/web/app/components/plugins/marketplace/search-box/search-dropdown/index.tsx b/web/app/components/plugins/marketplace/search-box/search-dropdown/index.tsx index 1beaf4ddda..76b9d0ab93 100644 --- a/web/app/components/plugins/marketplace/search-box/search-dropdown/index.tsx +++ b/web/app/components/plugins/marketplace/search-box/search-dropdown/index.tsx @@ -203,7 +203,7 @@ function TemplatesSection({ templates, includeSource, t }: {