diff --git a/frontend/common/code-help/create-user/create-user-next.js b/frontend/common/code-help/create-user/create-user-next.js
index fcd4b1c5c6e8..cfd0890775f8 100644
--- a/frontend/common/code-help/create-user/create-user-next.js
+++ b/frontend/common/code-help/create-user/create-user-next.js
@@ -23,7 +23,7 @@ export default function HomePage() {
export default function App({ Component, pageProps, flagsmithState } {
return (
- <FlagsmithProvider
+
= ({ code, language = 'bash' }) => (
-
+
{code}
diff --git a/frontend/web/components/pages/onboarding/OnboardingConnectPanel/sdkSnippets.ts b/frontend/web/components/pages/onboarding/OnboardingConnectPanel/sdkSnippets.ts
index f141a31241ce..9611a45e4f8f 100644
--- a/frontend/web/components/pages/onboarding/OnboardingConnectPanel/sdkSnippets.ts
+++ b/frontend/web/components/pages/onboarding/OnboardingConnectPanel/sdkSnippets.ts
@@ -1,11 +1,8 @@
// Snippets for every SDK we support, sourced from the maintained
// `Constants.codeHelp` (the same install/init the rest of the app uses, so
-// they don't drift). Two adaptations for this page:
-// 1. codeHelp snippets are authored for innerHTML rendering, so they carry
-// HTML entities (< etc.). We render via (escaping on), so
-// we unescape first.
-// 2. They use a placeholder flag name; we swap it for the user's real flag,
-// so the snippet references the flag this onboarding actually created.
+// they don't drift). One adaptation for this page: codeHelp uses a placeholder
+// flag name; we swap it for the user's real flag, so the snippet references
+// the flag this onboarding actually created.
// The SDK list itself (labels, logos, codeHelp keys) lives in ./sdkLangs.
import Constants from 'common/constants'
import { SdkLang } from './sdkLangs'
@@ -14,14 +11,6 @@ import { SdkLang } from './sdkLangs'
// exported); if that placeholder ever changes, update this too.
const PLACEHOLDER_FLAG = 'my_cool_feature'
-const unescapeHtml = (s: string): string =>
- s
- .replace(/</g, '<')
- .replace(/>/g, '>')
- .replace(/'/g, "'")
- .replace(/"/g, '"')
- .replace(/&/g, '&')
-
export type SdkSnippet = {
install: string
// Present for npm-based SDKs (codeHelp ships both managers in one block);
@@ -55,12 +44,12 @@ export const getSdkSnippet = (
string,
string
>
- const wire = unescapeHtml(inits[lang.initKey ?? lang.codeHelpKey] ?? '')
+ const wire = (inits[lang.initKey ?? lang.codeHelpKey] ?? '')
.split(PLACEHOLDER_FLAG)
.join(featureName)
return {
language: lang.language,
- ...parseInstall(unescapeHtml(installs[lang.codeHelpKey] ?? '')),
+ ...parseInstall(installs[lang.codeHelpKey] ?? ''),
wire: wire.trim(),
}
}