don't htmlencode 'title' (#33920)
This commit is contained in:
@@ -62,7 +62,7 @@ export const getArticleContextFromRequest = (req: any): ArticleContextT => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: page.titlePlainText,
|
title: page.title,
|
||||||
intro: page.intro,
|
intro: page.intro,
|
||||||
effectiveDate: page.effectiveDate || '',
|
effectiveDate: page.effectiveDate || '',
|
||||||
renderedPage: req.context.renderedPage || '',
|
renderedPage: req.context.renderedPage || '',
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export const getAutomatedPageContextFromRequest = (req: any): AutomatedPageConte
|
|||||||
const page = req.context.page
|
const page = req.context.page
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: page.titlePlainText,
|
title: page.title,
|
||||||
intro: page.intro,
|
intro: page.intro,
|
||||||
renderedPage: req.context.renderedPage || '',
|
renderedPage: req.context.renderedPage || '',
|
||||||
miniTocItems: req.context.miniTocItems || [],
|
miniTocItems: req.context.miniTocItems || [],
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const useTocLandingContext = (): TocLandingContextT => {
|
|||||||
|
|
||||||
export const getTocLandingContextFromRequest = (req: any): TocLandingContextT => {
|
export const getTocLandingContextFromRequest = (req: any): TocLandingContextT => {
|
||||||
return {
|
return {
|
||||||
title: req.context.page.titlePlainText,
|
title: req.context.page.title,
|
||||||
productCallout: req.context.page.product || '',
|
productCallout: req.context.page.product || '',
|
||||||
introPlainText: req.context.page.introPlainText,
|
introPlainText: req.context.page.introPlainText,
|
||||||
tocItems: (req.context.genericTocFlat || req.context.genericTocNested || []).map((obj: any) =>
|
tocItems: (req.context.genericTocFlat || req.context.genericTocNested || []).map((obj: any) =>
|
||||||
|
|||||||
@@ -178,10 +178,6 @@ class Page {
|
|||||||
})
|
})
|
||||||
this.title = await renderContentWithFallback(this, 'rawTitle', context, {
|
this.title = await renderContentWithFallback(this, 'rawTitle', context, {
|
||||||
textOnly: true,
|
textOnly: true,
|
||||||
encodeEntities: true,
|
|
||||||
})
|
|
||||||
this.titlePlainText = await renderContentWithFallback(this, 'rawTitle', context, {
|
|
||||||
textOnly: true,
|
|
||||||
})
|
})
|
||||||
this.shortTitle = await renderContentWithFallback(this, 'shortTitle', context, {
|
this.shortTitle = await renderContentWithFallback(this, 'shortTitle', context, {
|
||||||
textOnly: true,
|
textOnly: true,
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ export default async function renderPage(req, res) {
|
|||||||
if (isConnectionDropped(req, res)) return
|
if (isConnectionDropped(req, res)) return
|
||||||
|
|
||||||
// Create string for <title> tag
|
// Create string for <title> tag
|
||||||
page.fullTitle = page.titlePlainText
|
page.fullTitle = page.title
|
||||||
|
|
||||||
// add localized ` - GitHub Docs` suffix to <title> tag (except for the homepage)
|
// add localized ` - GitHub Docs` suffix to <title> tag (except for the homepage)
|
||||||
if (!patterns.homepagePath.test(path)) {
|
if (!patterns.homepagePath.test(path)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user