JavaScript: 종료되지 않은 문자열 리터럴은 어디에?

cppig1995의 이미지

문법 강조된 결과를 보면 탈출 처리가 잘 되어 있는 것 같은데요.
종료되지 않은 문자열 리터럴이라는 오류가 납니다.
왜 그런지 모르겠네요.

onload="document.getElementById('ryejin').innerHTML=''+String.fromCharCode(60,101,109,98,101,100)+' src=\"http://flvs.daum.net/flvPlayer.swf?vid=X2HgVYKGx7g$\" width=\"502\" height=\"399\" /'+String.fromCharCode(62)+''"

정확히 동일한 역할을 하는 아래 코드는 정상적으로 동작합니다.

onload="document.getElementById('ryejin').innerHTML=String.fromCharCode(60,101,109,98,101,100,32,115,114,99,61,34,104,116,116,112,58,47,47,102,108,118,115,46,100,97,117,109,46,110,101,116,47,102,108,118,80,108,97,121,101,114,46,115,119,102,63,118,105,100,61,88,50,72,103,86,89,75,71,120,55,103,36,34,32,119,105,100,116,104,61,34,53,48,50,34,32,104,101,105,103,104,116,61,34,51,57,57,34,32,47,62)"

마비노기 영웅전 서버게시판에 동영상을 올리기 위해 사용하는 코드입니다.
String.fromCharCode(60,101,109,98,101,100) = <embed
String.fromCharCode(62) = >

cppig1995의 이미지

document.getElementById('ryejin').innerHTML=''+String.fromCharCode(60,101,109,98,101,100)+' src=\"http://flvs.daum.net/flvPlayer.swf?vid=X2HgVYKGx7g$\" width=\"502\" height=\"399\" /'+String.fromCharCode(62)+''

위의 코드를 javascript pseudo-protocol을 이용해서 실행시켜 보니 정상적으로 동작합니다.
따라서 이 코드(위치는 397행)에 문제가 없다고 가정하면,
IE7에서 종료되지 않은 문자열 리터럴 오류가 155행 3열, 398행 2열에서 발생하는데
155행의 오류 때문에 398행에서 같은 오류가 발생할 수 있나요?

155행에는 <script> 태그 안에서 javascript: 형태를 사용하는 수상한 코드가 있습니다.
(넥슨에 버그 리포트라도 해야겠군요.)

> What is the difference between software and hard water?
} Bugs drown in hard water, but live forever in software.

Real programmers /* don't */ comment their code.
If it was hard to write, it should be /* hard to */ read.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.