[cc-commits] [git]cc.license (branch master) updated. 0809cbb5f1df338bdadc684faf0459ee76be7658

git version control webmaster at creativecommons.org
Wed Mar 17 19:37:53 EDT 2010


The branch, master has been updated
       via  0809cbb5f1df338bdadc684faf0459ee76be7658 (commit)
       via  50635fcd60ea973ef5705d8c3bebcb493672ec6b (commit)
      from  00ca5c7bc91e828ce41c3136b553eda03e83c26d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0809cbb5f1df338bdadc684faf0459ee76be7658
Author: JED3 <jed at jedpad.(none)>
Date:   Wed Mar 17 16:37:17 2010 -0700

    Need to escape the license title in the templates
    
    "Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales License"
    
    Will cause lxml to barf when the stripped_inner_xml function is called from the formatter

commit 50635fcd60ea973ef5705d8c3bebcb493672ec6b
Author: JED3 <jed at jedpad.(none)>
Date:   Wed Mar 17 16:35:17 2010 -0700

    CC0 by answers should return 'CC0' as the code, not 'zero'

-----------------------------------------------------------------------

Summary of changes (followed by patch):
 cc/license/formatters/templates/attribution.html   |    4 ++--
 .../templates/attribution_worktitle.html           |    4 ++--
 cc/license/formatters/templates/default.html       |    4 ++--
 cc/license/formatters/templates/worktitle.html     |    4 ++--
 cc/license/selectors/classes.py                    |    1 +
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/cc/license/formatters/templates/attribution.html b/cc/license/formatters/templates/attribution.html
index cc891ca..4d02d75 100644
--- a/cc/license/formatters/templates/attribution.html
+++ b/cc/license/formatters/templates/attribution.html
@@ -3,7 +3,7 @@
 {% block header %}
   {% if dctype %}
     {% trans license_uri=this_license.uri,
-             license_title=this_license.title(locale) %}
+             license_title=this_license.title(locale)|escape %}
       This
       <span xmlns:dc="http://purl.org/dc/elements/1.1/"
             href="{{ dctype_url }}"
@@ -23,7 +23,7 @@
     {% endtrans %}
   {% else %}
     {% trans license_uri=this_license.uri,
-             license_title=this_license.title(locale) %}
+             license_title=this_license.title(locale)|escape %}
       This work by
       <a xmlns:cc="http://creativecommons.org/ns#"
          property="cc:attributionName" rel="cc:attributionURL"
diff --git a/cc/license/formatters/templates/attribution_worktitle.html b/cc/license/formatters/templates/attribution_worktitle.html
index 6c59521..12110cb 100644
--- a/cc/license/formatters/templates/attribution_worktitle.html
+++ b/cc/license/formatters/templates/attribution_worktitle.html
@@ -3,7 +3,7 @@
 {% block header %}
   {% if dctype %}
     {% trans license_uri=this_license.uri,
-             license_title=this_license.title(locale) %}
+             license_title=this_license.title(locale)|escape %}
       <span xmlns:dc="http://purl.org/dc/elements/1.1/"
             property="dc:title"
             href="{{ dctype_url }}"
@@ -25,7 +25,7 @@
     {% endtrans %}
   {% else %}
     {% trans license_uri=this_license.uri,
-             license_title=this_license.title(locale) %}
+             license_title=this_license.title(locale)|escape %}
       <span xmlns:dc="http://purl.org/dc/elements/1.1/"
             property="dc:title">{{ worktitle }}</span>
       by
diff --git a/cc/license/formatters/templates/default.html b/cc/license/formatters/templates/default.html
index 570c12f..852a9ec 100644
--- a/cc/license/formatters/templates/default.html
+++ b/cc/license/formatters/templates/default.html
@@ -3,7 +3,7 @@
 {% block header %}
   {% if dctype %}
     {% trans license_uri=this_license.uri,
-             license_title=this_license.title(locale) %}
+             license_title=this_license.title(locale)|escape %}
       This
       <span xmlns:dc="http://purl.org/dc/elements/1.1/"
             href="{{ dctype_url }}"
@@ -17,7 +17,7 @@
     {% endtrans %}
   {% else %}
     {% trans license_uri=this_license.uri,
-             license_title=this_license.title(locale) %}
+             license_title=this_license.title(locale)|escape %}
       This work is licensed under a
       <a rel="license" href="{{ license_uri }}">
         Creative Commons
diff --git a/cc/license/formatters/templates/worktitle.html b/cc/license/formatters/templates/worktitle.html
index 8386be8..b74c9d8 100644
--- a/cc/license/formatters/templates/worktitle.html
+++ b/cc/license/formatters/templates/worktitle.html
@@ -3,7 +3,7 @@
 {% block header %}
   {% if dctype %}
     {% trans license_uri=this_license.uri,
-             license_title=this_license.title(locale) %}
+             license_title=this_license.title(locale)|escape %}
       <span xmlns:dc="http://purl.org/dc/elements/1.1/"
             property="dc:title"
             href="{{ dctype_url }}"
@@ -19,7 +19,7 @@
     {% endtrans %}
   {% else %}
     {% trans license_uri=this_license.uri,
-             license_title=this_license.title(locale) %}
+             license_title=this_license.title(locale)|escape %}
       <span xmlns:dc="http://purl.org/dc/elements/1.1/"
             property="dc:title">{{ worktitle }}</span>
       is licensed under a
diff --git a/cc/license/selectors/classes.py b/cc/license/selectors/classes.py
index 06025dd..1119ea5 100644
--- a/cc/license/selectors/classes.py
+++ b/cc/license/selectors/classes.py
@@ -36,6 +36,7 @@ class LicenseSelector:
         self._by_answers  = {
             'standard' : self._by_answers_standard,
             'recombo'  : self._by_answers_recombo,
+            'zero'     : self._by_answers_generic('CC0'),
             }.get(self.id) or self._by_answers_generic(self.id)
         
 


hooks/post-receive
-- 
cc.license



More information about the cc-commits mailing list