From 6d5e06832b2e7619c44634b3e07f2b139dcff9b3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:14:42 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E4=BF=AE=E5=A4=8D:=20XSS?= =?UTF-8?q?=E9=98=B2=E6=8A=A4(data-attr=E6=9B=BF=E4=BB=A3inline=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6)=E3=80=81crypto.getRandomValues=E6=9B=BF=E4=BB=A3Math?= =?UTF-8?q?.random=E3=80=81=E8=BE=93=E5=87=BA=E8=BD=AC=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/5fc8d967-00c4-4b70-9d49-bd775684c43b Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> --- docs/index.html | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/index.html b/docs/index.html index 0dd62485..3e4566cc 100644 --- a/docs/index.html +++ b/docs/index.html @@ -501,7 +501,7 @@ function updateWork(id,fn){ ws[idx].updated=new Date().toISOString().slice(0,10); saveWorks(ws); } -function genId(){return Date.now().toString(36)+Math.random().toString(36).substr(2,4)} +function genId(){var a=new Uint8Array(6);crypto.getRandomValues(a);return Date.now().toString(36)+Array.from(a,function(b){return b.toString(36)}).join('').substr(0,4)} function wordCount(s){return s?s.replace(/\s/g,'').length:0} function totalWords(w){ var c=0; @@ -523,7 +523,7 @@ function renderWorkList(){ var wc=totalWords(w); var cc=w.chapters?w.chapters.length:0; var chc=w.characters?w.characters.length:0; - return '
'+esc((c.traits||'').substring(0,60)+(c.traits&&c.traits.length>60?'...':''))+'
'+ '