줄바꿈 처리되어있는 경우 getSummary 추출 오류 수정#1221
Merged
1 commit merged intoMar 19, 2015
Merged
Conversation
ghost
pushed a commit
that referenced
this pull request
Mar 19, 2015
줄바꿈 처리되어있는 경우 getSummary 추출 오류 수정
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DB 에 기록될때 엔터키 처리되어있는 경우 (
태그등이 기록될때 자동으로 생김 )getSummary 에서 이를 제대로 인식 못하는 경우가 있다.
특히 이 값을 API 등에서 이용하기 위해 script 나 json 화 할때 값이 인식이 안 된다.
따라서 getSummary 과정에 nl2br 을 미리 한번 넣어 줄바꿈을 br 처리한 후...
그 아래에 br 을 제거하는 str_replace 로 다시 제거하는 방식을 취하면 에러없이 처리 가능하다