프로그래스바 수정, 이미지 분류 추가 및 UI 수정
This commit is contained in:
1 parent
8a39a34630
commit
2f720dfa92
12 files changed
+98
-43
No files matched your search
@@ -844,6 +844,16 @@ export interface AccommodationSearchItem {
|
||||
title: string;
|
||||
}
|
||||
|
||||
// 네이버 검색 API는 title에 <b> 태그와 & 같은 HTML 엔티티를 함께 내려주므로
|
||||
// 태그 제거 후 엔티티까지 디코딩해야 "&" 같은 원문이 그대로 노출되지 않는다.
|
||||
// textarea는 DOM에 붙이지 않고 content model상 스크립트를 실행하지 않으므로 엔티티 디코딩 용도로 안전하다.
|
||||
export const cleanSearchTitle = (title: string): string => {
|
||||
const withoutTags = title.replace(/<[^>]*>/g, '');
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.innerHTML = withoutTags;
|
||||
return textarea.value;
|
||||
};
|
||||
|
||||
export interface AccommodationSearchResponse {
|
||||
count: number;
|
||||
items: AccommodationSearchItem[];
|
||||
|
||||
Reference in new issue
Block a user