fix: JavaScript 템플릿 리터럴 이스케이프 문제 수정

🐛 해결된 문제:
- SyntaxError: Invalid escape in identifier 오류 수정
- 백슬래시 이스케이프 문제 해결

🔧 수정 내용:
- '\n' → '\n' (개행 문자 올바른 이스케이프)
- `/api/management/${issueId}` →  (템플릿 리터럴 수정)
- `Bearer ${localStorage...` →  (템플릿 리터럴 수정)
- `저장 실패: ${error.detail...` →  (템플릿 리터럴 수정)

💡 원인:
- HTML 내 JavaScript에서 백슬래시가 이중 이스케이프되어 발생
- 템플릿 리터럴 백틱이 백슬래시로 이스케이프되어 문법 오류

Expected Result:
 JavaScript 문법 오류 해결
 모달에서 이슈 저장 기능 정상 작동
 템플릿 리터럴 올바른 사용
This commit is contained in:
Hyungi Ahn
2025-10-26 13:13:37 +09:00
parent c680453227
commit 20965f8a42

View File

@@ -1908,13 +1908,13 @@
return;
}
const combinedDescription = title + (detail ? '\\n' + detail : '');
const combinedDescription = title + (detail ? '\n' + detail : '');
try {
const response = await fetch(\`/api/management/\${issueId}\`, {
const response = await fetch(`/api/management/${issueId}`, {
method: 'PUT',
headers: {
'Authorization': \`Bearer \${localStorage.getItem('access_token')}\`,
'Authorization': `Bearer ${localStorage.getItem('access_token')}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
@@ -1932,7 +1932,7 @@
loadManagementData(); // 페이지 새로고침
} else {
const error = await response.json();
alert(\`저장 실패: \${error.detail || '알 수 없는 오류'}\`);
alert(`저장 실패: ${error.detail || '알 수 없는 오류'}`);
}
} catch (error) {
console.error('저장 오류:', error);