From c403318ac6cc18419c4270b6e1954bc8790a77e4 Mon Sep 17 00:00:00 2001 From: koooooo-7 <369491420@qq.com> Date: Sat, 7 Dec 2019 21:55:42 +0800 Subject: [PATCH] [fix] when 'logo' is set, 'name' is not set correctly inside the 'alt' field. --- src/core/render/tpl.js | 10 +++++++--- src/core/util/core.js | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/core/render/tpl.js b/src/core/render/tpl.js index e280c4b5b..81aa97309 100644 --- a/src/core/render/tpl.js +++ b/src/core/render/tpl.js @@ -1,4 +1,5 @@ import {isMobile} from '../util/env' +import {escapeString} from '../util/core' /** * Render github corner * @param {Object} data @@ -30,6 +31,9 @@ export function corner(data, cornerExternalLinkTarge) { * Render main content */ export function main(config) { + + const name = config.name? escapeString(config.name):'' + const aside = '