FluxCP icon indicating copy to clipboard operation
FluxCP copied to clipboard

Ampersand in $this->url causes markup validator fails

Open csnv opened this issue 12 years ago • 4 comments

The W3C validator finds any "&" symbol as markup errors. Using just "&" in URLs is a bad practice as something like "&copy=3" can make the browser interpret it as "©=3".

My suggestion: Change every "&" character under "public function url ()" in Template.php to its HTML equivalent: & amp; That solves the problem and doesn't break stuff. Howerver, the preg replace in: return $serverProtocol.preg_replace('&/{2,}&', '/', "$serverAddress/$url"); May be redefined.

csnv avatar Aug 15 '13 14:08 csnv

Is this causing any current issues in any browser? Couldn't we also use '%26' to escape an ampersand?

datmumbles avatar Aug 26 '13 22:08 datmumbles

As far as I'm concerned it doesn't harm, but it's good practice.

csnv avatar Aug 29 '13 22:08 csnv

bump! xd

EPuncker avatar Nov 18 '13 14:11 EPuncker

2 years =0

EPuncker avatar May 08 '15 05:05 EPuncker