From 9da4eef21d2382077cf93aff2ba0e10912b44459 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 23 Sep 2026 16:12:24 +0000 Subject: [PATCH] fix: handle non-string values in flink tag escaping Co-authored-by: jerryc127 <16351105+jerryc127@users.noreply.github.com> --- scripts/tag/flink.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/tag/flink.js b/scripts/tag/flink.js index 81802ff..8788481 100644 --- a/scripts/tag/flink.js +++ b/scripts/tag/flink.js @@ -6,23 +6,24 @@ const { url_for, escapeHTML } = require('hexo-util') const urlFor = url_for.bind(hexo) +const safeEscape = value => escapeHTML(value == null ? '' : String(value)) const flinkFn = (args, content) => { const data = hexo.render.renderSync({ text: content, engine: 'yaml' }) let result = '' data.forEach(item => { - const className = item.class_name ? `` : '' - const classDesc = item.class_desc ? `` : '' + const className = item.class_name ? `` : '' + const classDesc = item.class_desc ? `` : '' const listResult = item.link_list.map(link => ` `).join('')