1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

strip HTML from meta page title

This commit is contained in:
Matthias Kretschmann 2019-04-08 16:21:56 +02:00
parent 7a24f489b7
commit ba186b832a
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -21,7 +21,8 @@ const Route = ({
}) => (
<div className={className}>
<Helmet defaultTitle={meta.title} titleTemplate={`%s - ${meta.title}`}>
<title>{title}</title>
{/* Strip HTML from passed title */}
<title>{title.replace(/(<([^>]+)>)/gi, '')}</title>
{description && <meta name="description" content={description} />}
</Helmet>