Skip to content

Commit 3329351

Browse files
committed
Fixes weird crash issue
1 parent 6343cf9 commit 3329351

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

velog-backend/src/lib/common.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ export const extractKeys = (object: any, params: Array<string>): any => {
7474
};
7575

7676
export function formatShortDescription(markdown: string): string {
77-
const replaced = markdown.replace(/\n/g, ' ').replace(/```(.*)```/g, '');
77+
const replaced = markdown
78+
.replace(/\n/g, ' ')
79+
.replace(/```(.*)```/g, '')
80+
.replace(/[<>]/g, '');
81+
7882
return (
7983
removeMd(replaced)
8084
.slice(0, 200)

0 commit comments

Comments
 (0)