--- a/dataimport.py Wed Feb 12 17:32:49 2014 +0100
+++ b/dataimport.py Fri Feb 14 16:10:36 2014 +0100
@@ -1116,9 +1116,9 @@
def _handle_source_relation_sql(self, session, sql, attrs):
self._append_to_entities(sql, attrs)
- # XXX add_info is similar to the one in NativeSQLSource. It is rewritten
- # here to correctly used the _handle_xxx of the SQLGenSourceWrapper. This
- # part should be rewritten in a more clearly way.
+ # add_info is _copypasted_ from the one in NativeSQLSource. We want it
+ # there because it will use the _handlers of the SQLGenSourceWrapper, which
+ # are not like the ones in the native source.
def add_info(self, session, entity, source, extid, complete):
"""add type and source info for an eid into the system table"""
# begin by inserting eid/type/source/extid into the entities table
--- a/debian/changelog Wed Feb 12 17:32:49 2014 +0100
+++ b/debian/changelog Fri Feb 14 16:10:36 2014 +0100
@@ -16,6 +16,12 @@
-- Julien Cristau <julien.cristau@logilab.fr> Fri, 10 Jan 2014 17:14:18 +0100
+cubicweb (3.17.13-1) unstable; urgency=low
+
+ * new upstream release
+
+ -- Aurelien Campeas <aurelien.campeas@logilab.fr> Mon, 10 Feb 2014 17:57:58 +0100
+
cubicweb (3.17.12-1) unstable; urgency=low
* new upstream release
--- a/devtools/fill.py Wed Feb 12 17:32:49 2014 +0100
+++ b/devtools/fill.py Fri Feb 14 16:10:36 2014 +0100
@@ -384,10 +384,10 @@
def composite_relation(rschema):
for obj in rschema.objects():
- if obj.rdef(rschema, 'object').composite == 'subject':
+ if obj.rdef(rschema, 'object', takefirst=True).composite == 'subject':
return True
for obj in rschema.subjects():
- if obj.rdef(rschema, 'subject').composite == 'object':
+ if obj.rdef(rschema, 'subject', takefirst=True).composite == 'object':
return True
return False
--- a/sobjects/ldapparser.py Wed Feb 12 17:32:49 2014 +0100
+++ b/sobjects/ldapparser.py Fri Feb 14 16:10:36 2014 +0100
@@ -201,7 +201,7 @@
{'addr': emailaddr})
if not rset:
# not found, create it. first forge an external id
- emailextid = userdict['dn'] + '@@' + emailaddr
+ emailextid = userdict['dn'] + '@@' + emailaddr.encode('utf-8')
email = self.extid2entity(emailextid, 'EmailAddress',
address=emailaddr)
entity.cw_set(use_email=email)
--- a/uilib.py Wed Feb 12 17:32:49 2014 +0100
+++ b/uilib.py Fri Feb 14 16:10:36 2014 +0100
@@ -215,7 +215,7 @@
ALLOWED_TAGS = (defs.general_block_tags | defs.list_tags | defs.table_tags |
defs.phrase_tags | defs.font_style_tags |
- set(('span', 'a', 'br', 'img', 'map', 'area', 'sub', 'sup'))
+ set(('span', 'a', 'br', 'img', 'map', 'area', 'sub', 'sup', 'canvas'))
)
CLEANER = clean.Cleaner(allow_tags=ALLOWED_TAGS, remove_unknown_tags=False,
--- a/utils.py Wed Feb 12 17:32:49 2014 +0100
+++ b/utils.py Fri Feb 14 16:10:36 2014 +0100
@@ -375,9 +375,9 @@
if skiphead:
# Don't insert <script> tags directly as they would be
# interpreted directly by some browsers (e.g. IE).
- # Use <pre class="script"> tags instead and let
+ # Use <cubicweb:script> tags instead and let
# `loadAjaxHtmlHead` handle the script insertion / execution.
- w(u'<pre class="script" src="%s"></pre>\n' %
+ w(u'<cubicweb:script src="%s"></cubicweb:script>\n' %
xml_escape(jsfile))
# FIXME: a probably better implementation might be to add
# JS or CSS urls in a JS list that loadAjaxHtmlHead
@@ -392,9 +392,9 @@
if self.post_inlined_scripts:
if skiphead:
for script in self.post_inlined_scripts:
- w(u'<pre class="script">')
+ w(u'<cubicweb:script>')
w(xml_escape(script))
- w(u'</pre>')
+ w(u'</cubicweb:script>')
else:
w(self.script_opening)
w(u'\n\n'.join(self.post_inlined_scripts))
@@ -455,8 +455,8 @@
attrs = ' '.join('%s="%s"' % (attr, xml_escape(value))
for attr, value in self._htmlattrs)
if attrs:
- return '<html %s>' % attrs
- return '<html>'
+ return '<html xmlns:cubicweb="http://www.cubicweb.org" %s>' % attrs
+ return '<html xmlns:cubicweb="http://www.cubicweb.org">'
def getvalue(self):
"""writes HTML headers, closes </head> tag and writes HTML body"""
--- a/web/data/cubicweb.ajax.js Wed Feb 12 17:32:49 2014 +0100
+++ b/web/data/cubicweb.ajax.js Fri Feb 14 16:10:36 2014 +0100
@@ -200,7 +200,7 @@
},
_loadAjaxScripts: function($responseHead, $head) {
- $responseHead.find('pre.script').each(function(i) {
+ $responseHead.find('cubicweb\\:script').each(function(i) {
var $srcnode = $(this);
var url = $srcnode.attr('src');
if (url) {
@@ -222,7 +222,7 @@
jQuery.globalEval($srcnode.text());
}
});
- $responseHead.find('pre.script').remove();
+ $responseHead.find('cubicweb\\:script').remove();
}
});
--- a/web/test/unittest_views_baseviews.py Wed Feb 12 17:32:49 2014 +0100
+++ b/web/test/unittest_views_baseviews.py Fri Feb 14 16:10:36 2014 +0100
@@ -133,7 +133,7 @@
html_source = self.view('my-view').source
source_lines = [line.strip() for line in html_source.splitlines(False)
if line.strip()]
- self.assertListEqual(['<!DOCTYPE html>', '<html lang="en">'], source_lines[:2])
+ self.assertListEqual(['<!DOCTYPE html>', '<html xmlns:cubicweb="http://www.cubicweb.org" lang="en">'], source_lines[:2])
def test_set_doctype_no_reset_xmldecl(self):
"""
@@ -151,7 +151,7 @@
html_source = self.view('my-view').source
source_lines = [line.strip() for line in html_source.splitlines(False)
if line.strip()]
- self.assertListEqual([html_doctype, '<html lang="cz">', '<head>'],
+ self.assertListEqual([html_doctype, '<html xmlns:cubicweb="http://www.cubicweb.org" lang="cz">', '<head>'],
source_lines[:3])
if __name__ == '__main__':