Skip to content

Commit

Permalink
Fix: PagesのURLにエンコードが必要な名称を入れるとリンクできない
Browse files Browse the repository at this point in the history
mei23 committed Mar 17, 2024
1 parent 2e0a819 commit 888e4bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc/aiscript/evaluator.ts
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ export class ASEvaluator {
this.envVars = {
AI: 'kawaii',
VERSION: version,
URL: opts.page ? `${opts.url}/@${opts.page.user.username}/pages/${opts.page.name}` : '',
URL: opts.page ? `${opts.url}/@${opts.page.user.username}/pages/${encodeURIComponent(opts.page.name)}` : '',
LOGIN: opts.visitor != null,
NAME: opts.visitor ? opts.visitor.name || opts.visitor.username : '',
USERNAME: opts.visitor ? opts.visitor.username : '',

0 comments on commit 888e4bc

Please sign in to comment.