diff --git a/lib/routes/nga/forum.js b/lib/routes/nga/forum.js
index c0a042f2f..bf50f12c4 100644
--- a/lib/routes/nga/forum.js
+++ b/lib/routes/nga/forum.js
@@ -2,6 +2,13 @@ const got = require('@/utils/got');
module.exports = async (ctx) => {
const { fid } = ctx.params;
+ const formatContent = (content) =>
+ content
+ .replace(/\[img\](.+?)\[\/img\]/g, (match, p1) => {
+ const src = p1.replace(/\?.*/g, '');
+ return `
`;
+ })
+ .replace(/\[url\](.+?)\[\/url\]/g, `$1`);
const homePage = await got({
method: 'post',
url: 'https://ngabbs.com/app_api.php?__lib=subject&__act=list',
@@ -39,7 +46,7 @@ module.exports = async (ctx) => {
},
});
- return response.data.result[0].content;
+ return formatContent(response.data.result[0].content);
});
item.description = description;