From e72d10e5012cd0763bee44cf368b142fcffe92d6 Mon Sep 17 00:00:00 2001 From: kanasimi Date: Sat, 22 Jun 2024 05:52:42 +0800 Subject: [PATCH] fix function get_page_title_link(page_data, display_text, options) --- application/net/wiki/namespace.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/net/wiki/namespace.js b/application/net/wiki/namespace.js index 5fed4772..c12e3452 100644 --- a/application/net/wiki/namespace.js +++ b/application/net/wiki/namespace.js @@ -2490,10 +2490,11 @@ function module_code(library_namespace) { if (need_escape) { title = ':' + title; } + // TODO: for template transclusion, use {{title}} return '[[' + title + (display_text && display_text !== title ? '|' // library_namespace.Unicode_to_HTML() - + display_text.replace(/[\[\]]/g, function(char) { + + String(display_text).replace(/[\[\]]/g, function(char) { return '&#' + char.charCodeAt(0) + ';'; }) : '') + ']]'; }