Barry Cornelius wrote:
>
> However, after a closer look at this item, I noticed
that for this item
> there is a leading space in the URL, i.e., it has
" http:" rather than
> "http:". I think that that is illegal
according to section 3 of
> http://www.ietf.
org/rfc/rfc2396.txt.
>
> Is it easy/a-good-idea to improve on the warning
message that is given
> in this situation?
> "description should not contain relative URL
references"
I've improved the logic. As with many issues, this one has
layers.
The code in question is looking for relative URI references,
a common
issue with RSS feeds. When it sees something it doesn't
like, it
confidently reports on the most common reason for that
situation, which
in this case is, as you put it, inappropriate.
Yes, space characters are illegal inside a URI. But that
begs the
question: in this case, where does the URI start and where
does it end?
That turns out to be a HTML question, and assuming the
role of being a
full HTML validator is beyond the scope of this section of
code at this
point in time. Besides, in the one browser I tested,
leading and
trailing spaces in href attributes are ignored.
So, I've done this:
* Before validating, I strip leading and trailing
whitespace.
* Then I validate that each character is a valid URI
character. If
not, I will report on that. This will catch spaces
inside a URI.
* If there are no errors found so far, then the previous
logic will
take over. In most cases, the message it provides will
be correct
and helpful.
- Sam Ruby
P.S. Bug reports such as these are most helpful. Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "feedvalidator-users" group.
To post to this group, send email to feedvalidator-users googlegroups.com
To unsubscribe from this group, send email to
feedvalidator-users-unsubscribe googlegroups.com
For more options, visit this group at http://groups.google.com/group/feedvalidator-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|