views:

124

answers:

1

I am making a web page using the Google App Engine. I am validating my pages, and found that the logout link that is generated by the call to the users api (in python) users.create_logout_url(request.uri) does not validate as XHTML 1.0 Strict. The href in the anchor tag looks like this:
/_ah/login?continue=http%3A//localhost%3A8080/&action=Logout
Including a link with this anchor text throws three different validation errors:

*general entity "action" not defined and no default entity
*reference to entity "action" for which no system identifier could be generated
*EntityRef: expecting ';'

Here is a dummy page with the anchor tag in it, if you want to try it on w3c validator.Dummy Page.

The logout link wont work, but you can see how the page is valid without it, but the actual text inside the href tag breaks the validation.

Any thoughts on whats going on? Thank you!

+3  A: 

This is a dev_appserver issue. The & before action should be escaped to %26.

This problem does not occur on production, though.

The logout url looks like this and it's perfectly valid.

"http://xxxxxx.appspot.com/_ah/logout?continue=https://www.google.com/accounts/Logout%3Fcontinue%3Dhttp://xxxxxx.appspot.com/%26service%3Dah"
jbochi
Makes perfect sense. Thanks jbochi!
goggin13
I'm glad I could help!
jbochi