Menu

#18 & char in XHTML (bug 501788)

open
nobody
None
5
2002-01-14
2002-01-14
No

This patch should help write w3c conformant XHTML web pages while
using PHPlib. It is released against phplib 7.4rc1

For a
definition of the problem see bug #501788.

WARNING: the patch
will print urls containing '&' instead of '&' characters as
argument separators; if your website code does a lot of URL mangling
magic it is likely to fall apart...

maybe a better option would
be to have a different set of procedures that output XMTHL valid
URLs, instead of patching the current one... who
knows?

Anyway, here it is the (modified) last lines of function
url() in session.inc:

// Encode naughty characters in the
URL
$url = str_replace(array("<", ">", " ", "\"", "'", "&",
"&"), // G. Giunta 2002/01/10
array("%3C", "%3E", "+",
"%22", "%27", "&", "&"), $url); // G. Giunta 2002/01/10

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.