Issue447

Title Encode entities in output intended for direct inclusion
Priority bug Status in-progress
Project API Milestone
Superseder Nosy List cwebber, nathan
Assigned To cwebber Keywords

Created on 2009-09-01.16:56:43 by nathan, last changed 2009-09-18.18:37:30 by nathan.

Messages
msg1365 (view) Author: nathan Date: 2009-09-18.18:37:30
Rolled out on current API 1.5, dev instances.
msg1364 (view) Author: nathan Date: 2009-09-18.18:33:36
Fixed in svn rev 13397.

Reassigning to cwebber for handling in new api code (in git) prior to rollout.
msg1321 (view) Author: nathan Date: 2009-09-01.16:56:43
/support/jurisdictions is intended for direct inclusion in HTML; as such
ampersands in the output should probably be encoded as entities.

This will need to be fixed in the currently deployed codebase and the new,
"sanity" code base as well.  Assigning to myself first for the former; Chris
will handle for the latter.

From cc-devel:

I recently started using the "creativecommons" Drupal module that Blaise has
been developing this summer.  Today I came across a bug that is rooted in CC's
REST service (http://drupal.org/node/564816 ).

The output of the /support/jurisdictions call is HTML, but not fully to spec
because it has a naked "&" character.  I guess it depends on what version of
HTML is being returned.  HTML4 says & *should* be encoded as &.  And if it's
supposed to be XHTML, then it's necessary.

Specifically, I believe the output for "UK: England & Wales" should be "UK:
England & Wales". The 1.5 and dev versions both output the former.

http://api.creativecommons.org/rest/1.5/support/jurisdictions
http://api.creativecommons.org/rest/dev/support/jurisdictions

Could the output be entity-encoded?  Or perhaps there could be an output like
the ".js" for XML?
http://api.creativecommons.org/rest/1.5/support/jurisdictions.xml
History
Date User Action Args
2009-09-18 18:37:30nathansetmessages: + msg1365
2009-09-18 18:33:42nathansetstatus: chatting -> in-progress
2009-09-18 18:33:36nathansetstatus: unread -> chatting
assignedto: nathan -> cwebber
messages: + msg1364
2009-09-01 16:56:43nathancreate