FluxCP
FluxCP copied to clipboard
Ampersand in $this->url causes markup validator fails
The W3C validator finds any "&" symbol as markup errors. Using just "&" in URLs is a bad practice as something like "©=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.
Is this causing any current issues in any browser? Couldn't we also use '%26' to escape an ampersand?
As far as I'm concerned it doesn't harm, but it's good practice.
bump! xd
2 years =0