Skip to content

Commit 4146753

Browse files
committed
Add html escape for repository full name
1 parent d4645fd commit 4146753

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web_src/js/features/comp/SearchRepoBox.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {fomanticQuery} from '../../modules/fomantic/base.ts';
2+
import {htmlEscape} from '../../utils/html.ts';
23

34
const {appSubUrl} = window.config;
45

@@ -18,8 +19,8 @@ export function initCompSearchRepoBox() {
1819
const items = [];
1920
for (const item of response.data) {
2021
items.push({
21-
title: item.repository.full_name.split('/')[1],
22-
description: item.repository.full_name,
22+
title: htmlEscape(item.repository.full_name.split('/')[1]),
23+
description: htmlEscape(item.repository.full_name),
2324
});
2425
}
2526
return {results: items};

0 commit comments

Comments
 (0)