-
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: wrong escape with link, image url when converting #2105
Conversation
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.
리뷰 완료합니다.
@@ -12,6 +12,31 @@ const reEscapeHTML = /<([a-zA-Z_][a-zA-Z0-9\-._]*)(\s|[^\\/>])*\/?>|<(\/)([a-zA- | |||
const reEscapeBackSlash = /\\[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~\\]/g; | |||
const reEscapePairedChars = /[*_~`]/g; | |||
|
|||
const XMLSPECIAL = '[&<>"]'; | |||
const reXmlSpecial = new RegExp(XMLSPECIAL, 'g'); |
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.
이 정규표현식은 리터럴로 표현이 안되어서 RegExp
객체로 만드신건가요?
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.
저 문자열들을 따로 사용해서 정규식을 만드는 경우가 있을 수 있어서 이전에 마크다운 파서에서처럼 똑같이 분리해서 작성해두었습니다. 추후 따로 재사용성이 전혀 없다고 판단되면 그때 통합할게요~
27afee8
to
aa13340
Compare
Hi. Why do you need to escape |
@ibedarev |
* fix: wrong escape with link, image url * chore: add test case(image, link url escape)
Why not using encodeURI for url encode |
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. 🎉 😘 ✨