This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 8767 - <svg><font>x</font>y</svg>z is not parsed as intended. the in body insertion mode processes </font> as HTML formatting element, not as a foreign element's tag.
Summary: <svg><font>x</font>y</svg>z is not parsed as intended. the in body insertion...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: LC
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks: 8966
  Show dependency treegraph
 
Reported: 2010-01-16 10:14 UTC by contributor
Modified: 2010-10-04 14:46 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2010-01-16 10:14:56 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#parsing-main-inforeign

Comment:
<svg><font>x</font>y</svg>z is not parsed as intended.	the in body insertion
mode processes </font> as HTML formatting element, not as a foreign element's
tag.

Posted from: 220.210.139.236
Comment 1 Ian 'Hixie' Hickson 2010-02-13 10:27:58 UTC
Hm, yes, same happens with </a>. I think the solution is to factor out the processing for "any other end tag" in the in-body insertion mode, and then in the in-foreign-content insertion mode, change "An end tag" to be "An end tag,  if the current node is an element in the HTML namespace." and add a new entry for "An end tag" that calls the factored out algorithm. Does that make sense?
Comment 2 Ian 'Hixie' Hickson 2010-02-17 23:52:46 UTC
Upon further consideration, I think the right thing to do is to add the following as an entry in the "in foreign content" list:

An end tag, if the current node is not an element in the HTML namespace:

Run these steps:

 1. Let /node/ be the current node.

 2. Loop: If /node/ has the same tag name as the end tag token, pop elements up to /node/ and abort. If /node/ isn't the current node, then this is a parse error.

 3. Otherwise, let /node/ be the previous element in the stack.

 4. If /node/ is in the HTML namespace, treat the token as per the secondary insertion mode. If, after doing so, the insertion mode is still "in foreign content", but there is no element in scope that has a namespace other than the HTML namespace, switch the insertion mode to the secondary insertion mode.

 5. Return to the "loop" step.


Also, change the current "An end tag" entry to be "Any other end tag".


Any opinions?
Comment 3 contributor 2010-02-25 02:10:14 UTC
Checked in as WHATWG revision r4803.
Check-in comment: Handle missing foreign content end tags and SVG </font> and </a> end tags in foreign content.
http://html5.org/tools/web-apps-tracker?from=4802&to=4803
Comment 4 Ian 'Hixie' Hickson 2010-02-25 02:20:20 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given above
Rationale: Concurred with reporter's comments.