Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ampersand in $this->url causes markup validator fails #6

Open
csnv opened this issue Aug 15, 2013 · 4 comments
Open

Ampersand in $this->url causes markup validator fails #6

csnv opened this issue Aug 15, 2013 · 4 comments
Labels

Comments

@csnv
Copy link

csnv commented Aug 15, 2013

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.

@datmumbles
Copy link

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

@csnv
Copy link
Author

csnv commented Aug 29, 2013

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

@EPuncker
Copy link

bump! xd

@EPuncker
Copy link

EPuncker commented May 8, 2015

2 years =0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants