-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: pasting error in table when using custom sanitizer (fix #980) #981
Conversation
* @param {boolean} needHtmlText pass true if need html text | ||
* @returns {string|DocumentFragment} result | ||
*/ | ||
function finalizeHtml(html, needHtmlText) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 함수 로직은 새니타이저 모듈 외에 다른 곳에서도 범용적으로 사용될 수 있는 로직이라고 판단되어 domUtils
모듈로 이동함
14c9163
to
686efbb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 완료입니다!
expect(pch.wwe.getSanitizer).toHaveBeenCalled(); | ||
}); | ||
|
||
it('sanitizes content of container', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 테스트가 있으니 첫번째 테스트는 없어져도 되지 않을까요? 검증하려는게 결국 디폴트 새니타이저를 탄 후 원하는 결과가 나오는가 라서 이 테스트로 첫번째 케이스까지 다 커버되는 것 같아요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
커스텀 새니타이저도 스파이로 걸지말고 단순한 새니타이저 하나 만들어서 처리해도 될 것 같다는 생각이 드네요ㅎ 수정할게요~
expect(tph.wwe.getSanitizer).toHaveBeenCalled(); | ||
}); | ||
|
||
it('returns html string as sanitized dom (DocumentFragment)', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 테스트에서도 역시 첫번째 케이스가 자동으로 커버되서 첫번째 케이스는 없어져도 되지 않을까요?
@seonim-ryu |
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)Description
Thank you for your contribution to TOAST UI product. 🎉 😘 ✨