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 11045 - U+0020 does not need to be escaped in srcdoc in XML
Summary: U+0020 does not need to be escaped in srcdoc in XML
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 10:32 UTC by Simon Pieters
Modified: 2011-08-04 05:35 UTC (History)
5 users (show)

See Also:


Attachments

Description Simon Pieters 2010-10-14 10:32:58 UTC
The new text for the Working Group Decision on ISSUE-103 srcdoc-xml-escaping says that U+0020 needs to be escaped.
 
<p class="note">Due to restrictions of <span>the XML syntax</span>,
- in XML a number of other characters need to be escaped also to
- ensure correctness.</p>
+ in XML the U+003C LESS-THAN SIGN character (&lt;) needs to be
+ escaped as well. In order to prevent <a
+ href="http://www.w3.org/TR/REC-xml/#AVNormalize">attribute-value
+ normalization</a>, XML's whitespace characters &mdash; U+0009
+ CHARACTER TABULATION (HT), U+000A LINE FEED (LF), U+000D CARRIAGE
+ RETURN (CR) and U+0020 SPACE &mdash; also need to be escaped. <a
+ href="#refsXML">[XML]</a></p>
 
My reading of the XML spec suggests space does not need to be escaped.
 
http://www.w3.org/TR/REC-xml/#AVNormalize
 
"For a white space character (#x20, #xD, #xA, #x9), append a space
character (#x20) to the normalized value."
 
i.e. a literal space and an escaped space results in the same thing.
 
The paragraph "If the attribute type is not CDATA, then the XML
processor MUST further process the normalized attribute value by
discarding any leading and trailing space (#x20) characters, and by
replacing sequences of space (#x20) characters by a single space (#x20)
character." does not apply since srcdoc is a CDATA attribute (and none of the allowed doctypes change that for srcdoc even if the UA uses a validating processor).
Comment 1 Simon Pieters 2010-10-14 10:35:28 UTC
Hmm, actually HTML5 allows any doctype in XML, so that paragraph *could* apply if the author goes out of his way to change srcdoc to be something other than CDATA, but in that case we could assume that the author knows what he's doing and the note doesn't need to cover that case IMHO.
Comment 2 Ian 'Hixie' Hickson 2010-12-26 19:58:14 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: Rejected
Change Description: no spec change
Rationale: If you disagree with the decision, please use the WG process to handle it. I'm not going to change the text without instruction from the chairs, especially on this issue, where my whole objection to the issue in the first place was that adding this text would mean it would be micromanaged for months afterwards.
Comment 3 Simon Pieters 2010-12-27 09:27:45 UTC
> If you disagree with the decision, please use the WG process to
handle it.

I don't disagree with the decision. I'm following the WG process here.

http://lists.w3.org/Archives/Public/public-html/2010Oct/0211.html
Comment 4 Ian 'Hixie' Hickson 2011-01-11 23:32:46 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 below
Rationale: Concurred with reporter's comments.
Comment 5 contributor 2011-01-11 23:39:41 UTC
Checked in as WHATWG revision r5777.
Check-in comment: this paragraph really shouldn't be in the spec in the first place, but since it's there, let's at least make it mostly correct
http://html5.org/tools/web-apps-tracker?from=5776&to=5777
Comment 6 Michael[tm] Smith 2011-08-04 05:35:27 UTC
mass-move component to LC1