I’d like to customize the reply/embedded-post. This requires a modification to the _computeCooked method in post-cooked via a plugin; essentially when this.attrs.embeddedPost is true, render something else.
I noticed it’s easier to override or reopen ‘conventional’ Ember classes or the widgets created using ‘createWidget’. What would be the best way to achieve this for the PostCooked class?
카테고리에 따라 커스텀 콘텐츠로 대체하고 싶은데, 그렇게 하는 것이 합리적입니다. 이 일은 decorateCooked로도 가능해야 합니다. 조금 읽어본 결과, jQuery를 사용하지 않으려는 제 상황에서는 decorateCookedElement가 더 적합해 보입니다. 감사합니다
설명용으로 스크립트 태그를 포함한 게시물들도 이러한 CSP 오류를 발생시키는 것 같습니다. 이제 정말로 혼란스럽습니다. 저장형 XSS에 대해 걱정해야 하는지, 아니면 CSP가 단순히 이를 차단할까요? 컴포저에서는 ckeditor를 사용하며 이는 셀프 XSS를 방지합니다. 만약 걱정해야 한다면, 위험한 태그를 제거해야 할 것 같습니다. 현재는 단순히
value = Loofah.fragment(value).scrub!(:escape).to_s
를 실행하고 있지만, 이 값으로 elem.innerHTML을 설정하면 HTML 엔티티가 단순히 이스케이프 해제되어 아무런 효과가 없는 것 같습니다.
수정: 마침 혼란의 원인을 찾았습니다: 인스펙트 엘리먼트(Inspect Element)는 실제 HTML을 보여주지 않습니다. 이미 HTML 엔티티를 변환해서 보여줍니다.