diff --git a/packages/volto/news/6493.bugfix b/packages/volto/news/6493.bugfix new file mode 100644 index 0000000000..a5e5c9aad3 --- /dev/null +++ b/packages/volto/news/6493.bugfix @@ -0,0 +1 @@ +No longer add classes from the query string search text in the `body` tag. @Abhishek-17h \ No newline at end of file diff --git a/packages/volto/src/components/theme/App/App.jsx b/packages/volto/src/components/theme/App/App.jsx index 1c900fefe1..cda1be4085 100644 --- a/packages/volto/src/components/theme/App/App.jsx +++ b/packages/volto/src/components/theme/App/App.jsx @@ -146,10 +146,13 @@ export class App extends Component { this.props.pathname !== '/', siteroot: this.props.pathname === '/', [`is-adding-contenttype-${decodeURIComponent( - this.props.location?.search?.replace('?type=', ''), + this.props.location?.search?.startsWith('?type=') + ? this.props.location?.search?.replace('?type=', '') + : '', ) .replaceAll(' ', '-') - .toLowerCase()}`]: this.props.location?.search, + .toLowerCase()}`]: + this.props.location?.search?.startsWith('?type='), 'is-authenticated': !!this.props.token, 'is-anonymous': !this.props.token, 'cms-ui': isCmsUI,