Mercurial > libervia-backend
comparison src/tools/xml_tools.py @ 615:6f4c31192c7c
plugins XEP-0060, XEP-0277, groupblog: comments implementation (first draft, not finished yet):
- PubSub options constants are moved to XEP-0060
- comments url are generated/parsed according to XEP-0277
- microblog data can now have the following keys:
- "comments", with the url as given in the <link> tag
- "comments_service", with the jid of the PubSub service hosting the comments
- "comments_node", with the parsed node
- comments nodes use different access_model according to parent microblog item access
- publisher is not verified yet, see FIXME warning
- so far, comments node are automatically subscribed
- some bug fixes
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 20 May 2013 23:21:29 +0200 |
parents | 84a6e83157c2 |
children | 0b914394e74f |
comparison
equal
deleted
inserted
replaced
614:bef0f893482f | 615:6f4c31192c7c |
---|---|
318 parser = domish.elementStream() | 318 parser = domish.elementStream() |
319 parser.DocumentStartEvent = onStart | 319 parser.DocumentStartEvent = onStart |
320 parser.ElementEvent = onElement | 320 parser.ElementEvent = onElement |
321 parser.DocumentEndEvent = onEnd | 321 parser.DocumentEndEvent = onEnd |
322 tmp = domish.Element((None, "s")) | 322 tmp = domish.Element((None, "s")) |
323 tmp.addRawXml(string.replace('\n', '').replace('\t', '')) | 323 tmp.addRawXml(string.replace('\n', ' ').replace('\t', ' ')) |
324 parser.parse(tmp.toXml().encode('utf-8')) | 324 parser.parse(tmp.toXml().encode('utf-8')) |
325 return self.result.firstChildElement() | 325 return self.result.firstChildElement() |