Status: New
Owner: ----

New issue 204 by infe...@chromium.org: Premature closure of <svg> tag
http://code.google.com/p/html5lib/issues/detail?id=204

Testcase.svg

<svg xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink";> <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/";> <d:testDescription xmlns="http://www.w3.org/1999/xhtml"; href="http://www.w3.org/TR/SVG11/text.html#Introduction";>
      <p>
        Run the test. No interaction required.
      </p>
    </d:testDescription>
  </d:SVGTestCase>
  <defs>
    <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
      <font-face-src>
        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
      </font-face-src>
    </font-face>
  </defs>
</svg>

When i use html5lib to parse this, and later serialize it, i get

<html><head></head><body><svg xlink="http://www.w3.org/1999/xlink"; xmlns="http://www.w3.org/2000/svg";> <d:svgtestcase xmlnsU0003Ad="http://www.w3.org/2000/02/svg/testsuite/description/";> <d:testdescription href="http://www.w3.org/TR/SVG11/text.html#Introduction"; xmlns="http://www.w3.org/1999/xhtml";>
      </d:testdescription></d:svgtestcase></svg><p>
        Run the test. No interaction required.
      </p>


  <defs>
    <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
      <font-face-src>
        <font-face-uri xlinkU0003Ahref="../resources/SVGFreeSans.svg#ascii">
      </font-face-uri></font-face-src>
    </font-face>
  </defs>

</body></html>

The svg tag is prematurely closed. This causes some issues when i am writing my security fuzzer that needs to understand tag context and namespace. e.g. font-face tag is incorrectly judged as http://www.w3.org/1999/xhtml namespace.

--
You received this message because you are subscribed to the Google Groups 
"html5lib-discuss" group.
To post to this group, send an email to html5lib-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
html5lib-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/html5lib-discuss?hl=en-GB.

Reply via email to