javascript 텍스트 편집기로 작성된 html 텍스트 입력을 내 데이터베이스에 저장하는 것이 안전하고 일반적인 방법입니까?레일 HTML 형식의 서식있는 텍스트 편집기로 작성된 텍스트 본문 저장
사용자가 응용 프로그램에서 기사를 입력하기 위해 ckeditor를 사용한다고 가정합니다. 기사는 클라이언트 측에서 볼 때 멋지게 보이지만 데이터베이스에서 쿼리하면 기사가 너무 복잡합니다.
예를 들어, 텍스트 본문은 다음과 같이 저장됩니다 :
<p class="MsoListParagraph" style="margin-left:56.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l3 level1 lfo1"><!--[if !supportLists]--><span lang="EN-US" style="font-size: 12pt; font-family: 'Times New Roman';">-<span style="font-size: 12pt; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-US" style="font-size: 12pt; font-family: 'Times New Roman';">Natural selection is a process that individuals
have some heritable characteristics to survive and reproduce at a higher rate
compare to other individuals. Natural selection increases the match between
organisms and environments. Furthermore, as an environment changes or
individuals move to a new place, natural selection may effect of adaptation to
these new conditions by giving rise to new species in the process. Natural
selection can only increase or decrease heritable traits. <u><o:p></o:p></u></span></p>
몸은
이 문제를 처리 할 수있는 더 나은 방법이 있나요 @article.body.html_safe
같은 렌더링?