fix: Correct HTML lang attribute in source. closes #6534
This commit is contained in:
@@ -6,6 +6,7 @@ import escape from "lodash/escape";
|
||||
import { Sequelize } from "sequelize";
|
||||
import isUUID from "validator/lib/isUUID";
|
||||
import { IntegrationType, TeamPreference } from "@shared/types";
|
||||
import { unicodeCLDRtoISO639 } from "@shared/utils/date";
|
||||
import documentLoader from "@server/commands/documentLoader";
|
||||
import env from "@server/env";
|
||||
import { Integration } from "@server/models";
|
||||
@@ -91,6 +92,7 @@ export const renderApp = async (
|
||||
ctx.body = page
|
||||
.toString()
|
||||
.replace(/\{env\}/g, environment)
|
||||
.replace(/\{lang\}/g, unicodeCLDRtoISO639(env.DEFAULT_LANGUAGE))
|
||||
.replace(/\{title\}/g, escape(title))
|
||||
.replace(/\{description\}/g, escape(description))
|
||||
.replace(/\{canonical-url\}/g, canonical)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="{lang}">
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
<meta name="theme-color" content="#FFF" />
|
||||
|
||||
Reference in New Issue
Block a user