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 16994 - What is "text"? Can an author use a U+0000 character in text?
Summary: What is "text"? Can an author use a U+0000 character in text?
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-08 13:26 UTC by contributor
Modified: 2012-09-24 03:25 UTC (History)
2 users (show)

See Also:


Attachments

Description contributor 2012-05-08 13:26:12 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/
Multipage: http://www.whatwg.org/C#syntax-text
Complete: http://www.whatwg.org/c#syntax-text

Comment:
What is "text"?  Can an author use a U+0000 character in text?

Posted from: 101.128.184.179
User agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19
Comment 1 contributor 2012-07-18 17:25:43 UTC
This bug was cloned to create bug 18143 as part of operation convergence.
Comment 2 Ian 'Hixie' Hickson 2012-09-24 03:25:27 UTC
Syntactically, yes, there's no constraint on Text itself. Where the syntactic construct "Text" is used, there are additional constraints (e.g. no "<" in Text used inside normal elements). But more importantly, a syntactic "Element" is restricted by this statement:

# Elements must not contain content that their content model disallows. 

This thus invokes all the content model rules, and the elements that are allowed to contain Text _nodes_ have their own restrictions, in particular:

# Text nodes [...] must not contain U+0000 characters [...]