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 12508 - Unclear how to handle <link href> when the href value is only whitespace
Summary: Unclear how to handle <link href> when the href value is only whitespace
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-15 18:30 UTC by Mats Palmgren
Modified: 2011-08-04 05:04 UTC (History)
5 users (show)

See Also:


Attachments

Description Mats Palmgren 2011-04-15 18:30:44 UTC
The text <link href> says it "must contain a valid non-empty URL potentially surrounded by spaces."
Further down in the section on how to "obtain the resource" the first
item in the list says "1. If the href attribute's value is the empty string, then abort these steps."
http://www.whatwg.org/specs/web-apps/current-work/#attr-link-href

It's not clear when/if the space should be removed from the @href value.
Perhaps you can make the space removal explicit, for example by adding a new
first step in the process to "obtain the resource", like so:

1. Remove leading and trailing space from the href attribute's value
2. If the href attribute's value is the empty string, then abort these steps.
3. ...



(Mozilla bug:  https://bugzilla.mozilla.org/show_bug.cgi?id=649134)
Comment 1 Mats Palmgren 2011-04-15 18:49:36 UTC
Additional note:
HTTP/1.1 doesn't include \f in space, unlike HTML5, so it's unclear how
Link: <\014>; rel="stylesheet"
should be processed for HTML documents.
https://bugzilla.mozilla.org/show_bug.cgi?id=649134#c11
Comment 2 Aryeh Gregor 2011-06-24 19:00:54 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: "must contain a valid non-empty URL potentially surrounded by spaces" is an authoring requirement, not an implementation requirement.  It only affects whether the page is valid, and has no bearing on how browsers should process the page:

"""
Note: There is no implied relationship between document conformance requirements and implementation conformance requirements. User agents are not free to handle non-conformant documents as they please; the processing model described in this specification applies to implementations regardless of the conformity of the input documents.
"""
http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#conformance-classes

If you follow the "obtain the resource" algorithm exactly as specified, without making any assumptions based on authoring conformance criteria or other considerations, it's clear that you should only abort if the href is an empty string.  Nothing says you should abort if the href consists of one or more space characters.

Please reopen if you either think the spec should change to also include whitespace-only href's, or if you think it should be further clarified somehow to say that it really only means the empty string.  In general, it's hard to clarify this sort of thing, where someone is reading between the lines of algorithms instead of taking them completely literally.
Comment 3 Michael[tm] Smith 2011-08-04 05:04:28 UTC
mass-moved component to LC1