Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const {
appMarkup = '',
appContext,
head,
initialState = {},
scripts,
cssLinks,
} = props;
const localeCode = initialState.config.requestLanguage;
const htmlLang = localeCode.split('-')[0];
/**
* Add polyfill.io script if needed
*/
const polyfill = getPolyfill(appContext.userAgent, localeCode);
const js = polyfill ? [polyfill, ...scripts] : [...scripts];
/**
* `initialState` has untrusted user-generated content that needs to be
* written into the DOM inside a