소스 검색

Fixes html content not showing in received response (#890)

Replaces html special characters with html entities
MrCrayon 10 달 전
부모
커밋
02f4f3f4d3
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      resources/views/themes/elements/index.blade.php

+ 3 - 0
resources/views/themes/elements/index.blade.php

@@ -137,6 +137,9 @@
                             }
                         } catch (e) {}
 
+                        // Replace HTML entities
+                        responseContent = responseContent.replace(/[<>&]/g, (i) => '&#' + i.charCodeAt(0) + ';');
+
                         contentEl.innerHTML = responseContent;
                         isJson && window.hljs.highlightElement(contentEl);
                     })