Merge pull request #18922 from ant-design/fix-site-title-char

tweak: site specialChar encoding
This commit is contained in:
信鑫-King 2019-09-20 17:32:29 +08:00 committed by GitHub
commit 8b4bd0c23d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@ class Article extends React.Component {
return (
/* eslint-disable-next-line */
<article className="markdown" onClick={this.onResourceClick}>
<Helmet>
<Helmet encodeSpecialCharacters={false}>
{helmetTitle && <title>{helmetTitle}</title>}
{helmetTitle && <meta property="og:title" content={helmetTitle} />}
{metaDesc && <meta name="description" content={metaDesc} />}

View File

@ -111,7 +111,7 @@ class ComponentDoc extends React.Component {
return (
<article className={articleClassName}>
<Helmet>
<Helmet encodeSpecialCharacters={false}>
{helmetTitle && <title>{helmetTitle}</title>}
{helmetTitle && <meta property="og:title" content={helmetTitle} />}
{contentChild && <meta name="description" content={contentChild} />}

View File

@ -69,7 +69,7 @@ class Home extends React.Component {
return (
<>
<style dangerouslySetInnerHTML={{ __html: getStyle() }} /> {/* eslint-disable-line */}
<Helmet>
<Helmet encodeSpecialCharacters={false}>
<title>{`Ant Design - ${intl.formatMessage({ id: 'app.home.slogan' })}`}</title>
</Helmet>
<Banner {...childProps} />

View File

@ -120,7 +120,7 @@ export default class Layout extends React.Component {
: 'An enterprise-class UI design language and React UI library with a set of high-quality React components, one of best React UI library for enterprises';
return (
<>
<Helmet>
<Helmet encodeSpecialCharacters={false}>
<html lang={appLocale.locale === 'zh-CN' ? 'zh' : 'en'} />
<title>{title}</title>
<meta name="description" content={description} />