diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index 8ac025180..c2c37b1d9 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "4.0.13", + "version": "4.0.14", "bin": "bin/hydrooj.js", "main": "src/plugin-api", "module": "src/plugin-api", diff --git a/packages/hydrooj/src/handler/problem.ts b/packages/hydrooj/src/handler/problem.ts index b21cbf751..f02c8afed 100644 --- a/packages/hydrooj/src/handler/problem.ts +++ b/packages/hydrooj/src/handler/problem.ts @@ -399,9 +399,9 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler { const info = str.match(/="file:\/\/(.+?)"/); return `="./${this.pdoc.docId}/file/${info[1]}${info[1].includes('?') ? '&' : '?'}tid=${args[1]}"`; }) - .replace(/=\\"file:\/\/(.+?)"/g, (str) => { + .replace(/=\\"file:\/\/(.+?)\\"/g, (str) => { const info = str.match(/=\\"file:\/\/(.+?)"/); - return `=\\"./${this.pdoc.docId}/file/${info[1]}${info[1].includes('?') ? '&' : '?'}tid=${args[1]}"`; + return `=\\"./${this.pdoc.docId}/file/${info[1]}${info[1].includes('?') ? '&' : '?'}tid=${args[1]}\\"`; }); } else { this.response.body.pdoc.content = this.response.body.pdoc.content