KLDP.net 뉴스 한글 출력 이상문제.

세이군의 이미지

어떻게 생각하면 무시할 수도 있는 문제중 하나입니다만...
이 주소를 한번 가 보시면


1. 제목표시줄과 본문 하단의 "게시판:"으로 시작하는 줄
2. 본문중 "요약:"으로 시작하는 줄

1, 2를 비교하면 2번은 영문대소문자, 한글이 모두 나옵니다.
하지만 1번은 2번에서 한글로 나오는 부분은 모두 -문자로, 영문은 소문자로 표시가 되고 있습니다.

그래서 이번 KLDP.net이전하기 전부터 계속 이 부분을 살펴보다가 오늘 결론을 찾았기에 여기 올려둡니다.

직접 리눅스에 설치해 가면서 찾아본 결과
http://gforge.org/plugins/scmcvs/cvsweb.php/gforge/www/news/submit.php?rev=1.20;content-type=text%2Fplain;cvsroot=gforge
이 파일의 116번째 줄이 문제인 것으로 확인되었습니다.
if (!$f->create(ereg_replace('[^_\.0-9a-z-]','-', strtolower($summary)),$details,1,'',0,0)) {

if (!$f->create($summary,$details,1,'',0,0)) {
로 바꾸면 이 문제가 해결됩니다.

Forums: 
권순선의 이미지

감사합니다. 방금 적용하였습니다... 왜 이렇게 해 두었는지는 gforge쪽에 한번 물어봐야겠네요.

권순선의 이미지

http://kldp.net/tracker/index.php?func=detail&aid=301075&group_id=1&atid=200001 에 이 내용과 관련된 것을 보이는 문제점이 제출되어 다시 예전 상태로 되돌려 놓았습니다.

gforge쪽에도 왜 이렇게 되어 있는지 물어보았는데 아직 답이 없네요.

세이군의 이미지

갑자기 이 내용이 올라오는 것을 보고 다시 검토를 했습니다.
그 결과 같은 동작을 하는 코드가 한 곳 더 있음을 발견했습니다.

http://gforge.org/plugins/scmcvs/cvsweb.php/gforge/common/forum/Forum.class?rev=1.21;cvsroot=gforge

137번째 라인입니다.
kldp.net에 올라온 문제점은 이 부분에서 나는 오류입니다.
/news/submit.php는

if (!$f->create(htmlspecialchars($summary),$details,1,'',0,0)) {


이 부분은 137번째 라인부터 140라인까지를
htmlspecialchars($forum_name);
바꾸면 해결이 가능할 것입니다.

이번엔 더 좋은 방법이 없을까 고민이 좀 되기는 합니다. 다른 부분도 추가로 살펴보도록 하겠습니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.