[Phplib-trackers] [ phplib-Bugs-501788 ] & char in URIs is invalid XHML
Brought to you by:
nhruby,
richardarcher
|
From: <no...@so...> - 2002-03-20 10:49:08
|
Bugs item #501788, was opened at 2002-01-10 15:11 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=501788&group_id=31885 Category: None Group: None Status: Closed Resolution: Rejected Priority: 5 Submitted By: Gaetano Giunta (ggiunta) Assigned to: Richard Archer (richardarcher) Summary: & char in URIs is invalid XHML Initial Comment: Intro: when writing XHTML docs the href attribute cannot ever contain the & char. So all URIs containing a query part with more than 1 params need to be rewritten using the & escape sequence (I tried it and it works!) Problem: the url(), self_url() etc... functions in phplib all use/search for only the & char as a query separator Suggestion: make new xurl(), xself_url(), ... functions, or modify existing ones... Thanks, Gaetano ---------------------------------------------------------------------- >Comment By: Gaetano Giunta (ggiunta) Date: 2002-03-20 11:49 Message: Logged In: YES user_id=114789 I know it sounds pretty funky, but I found it out while validating a phplib web site I was building (using w3c's own validator by means of the opera browser validate function). The main point is that the URI is specified as an attribute value. And XML forbids unescaped ampersands in attribute values (... seems like I cannot find reference to this assertion quicky anymore, so take it as my opinion only) Document references: XHTML 1.0 second edition draft, section C12 XML 1.0 second edition recommendation ---------------------------------------------------------------------- Comment By: Richard Archer (richardarcher) Date: 2002-01-14 21:25 Message: Logged In: YES user_id=279311 Are you sure the "&" character is not allowed? That would seem to me to be illogical. Example: in order to pass a parameter "tv=black&white" you need to escape the '&'. The XHTML spec at: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd defines a URI as: <!ENTITY % URI "CDATA"> <!-- a Uniform Resource Identifier, see [RFC2396] --> RFC 2396 http://www.faqs.org/rfcs/rfc2396.html defines '&' as a reserved character. These may appear unescaped in URIs and indeed *must* not be escaped or the meaning of the URI may change. Perhaps the implementation of XHTML you're using is buggy? Otherwise, I'd appreciate a link to an XHTML spec that defines URI's differently! ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=501788&group_id=31885 |