Commit graph libervia-backend/src/plugins/plugin_misc_text_syntaxes.py
Author SHA1 Message Date
Goffi
6bbcbaf522 use of /usr/bin/env instead of /usr/bin/python in shebang 2016-04-17 14:45:26 +02:00
Goffi
b28dcdbfb3 plugin text syntaxes: added 'poster' and 'controls' in allowed attributes for cleanXHTML 2016-03-01 16:36:16 +01:00
Goffi
bd971186de plugin text syntaxes: fixed defaut syntax handling 2016-02-18 15:41:47 +01:00
Goffi
c43362ab3f plugin blog import dotclear: this plugin import Dotclear 2 backups 2016-01-22 20:24:17 +01:00
souliane
f24d4f7992 plugin text syntaxes: fixes typo 2016-01-19 11:49:25 +01:00
Goffi
ee6688f800 pluging text syntaxes: various minor improvments:
- use tuple instead of list for STYLES_WHITELIST
    - specify where to get python makdown and html2text
    - renamed clean_xhtml to cleanXHTML for consistency
    - check name for conflict in addSyntax
2016-01-17 17:33:10 +01:00
Goffi
9fe9a339f1 plugin text syntaxes: a non blocking syntax callback can now return a unicode directly instead of a Deferred 2016-01-15 17:13:59 +01:00
Goffi
348be27934 copyright update 2016-01-03 16:28:30 +01:00
Goffi
969af13f59 plugins: added new MissingModule exceptions to plugins using third party modules 2015-09-30 17:25:09 +02:00
Goffi
f32b006d54 plugin text-syntaxes: minor variable renaming 2015-08-16 00:06:59 +02:00
Goffi
fbec02d396 2015 copyright dates update 2015-03-30 10:26:26 +02:00
souliane
ba3deb4c3e misc: remove some pylints warnings 2014-06-15 18:18:36 +02:00
Goffi
501bc92528 core: use of the new core.log module:
/!\ this is a massive refactoring and was largely automated, it probably did bring some bugs /!\
2014-04-19 19:19:19 +02:00
souliane
608e2ba9fa tools, frontends, memory: param definition and XMLUI handle multi-selection for list widgets:
- we need to update urwid_satext to revision 79
                          - no more "value" attribute value in the "list" element, use
                            HTML-style "select" attribute in the "option" elements instead
                          - /!\ param saving do not handle multiple values yet!
2014-04-01 21:21:13 +02:00
Goffi
fd22cf011d plugin text syntaxes: fixed cleaners encoding 2014-02-20 13:28:10 +01:00
souliane
d5fb045f5b plugin text_syntaxes: html2text was breaking the long URLs 2014-02-13 12:29:14 +01:00
souliane
c2e4e9f8f9 plugin text_syntaxes: rstrip the conversion result to avoid new lines systematically added by converters (e.g. html2text do this) 2014-02-12 15:21:00 +01:00
souliane
ff81f76184 plugin groupblog, XEP-0071, XEP-0277, text_syntaxes: manage raw/rich/xhtml data for content/title:
Implementation should follow the following formal specification:

"title" and "content" data can be passed in raw, xhtml or rich format.
When we receive from a frontend a new/updated microblog item:

- keys "title" or "content" have to be escaped (disable HTML tags)
- keys "title_rich" or "content_rich" have to be converted from the current syntax to XHTML
- keys "title_xhtml" or "content_xhtml" have to be cleaned from unwanted XHTML content

Rules to deal with concurrent keys:

- existence of both  "*_xhtml" and "*_rich" keys must raise an exception
- existence of both raw and ("*_xhtml" or "*_rich") is OK

As the storage always need raw data, if it is not given by the user it can be
extracted from the "*_rich" or "*_xhtml" data (remove the XHTML tags).

When a frontend wants to edit a blog post that contains XHTML title or content,
the conversion is made from XHTML to the current user-defined syntax.

- plugin text_syntaxes: added "text" syntax (using lxml)
2014-02-05 16:36:51 +01:00
Goffi
2ca6efd8cc dates update 2014-02-04 18:32:49 +01:00
Goffi
5a00dc9503 core: i18n refactoring:
- _() is no more installed in __builtin__
    - instead, there is a new sat.core.i18n module
    - added D_() method for deferred translation
    - languageSwitch method allow to dynamically change translation language
    - import gettext is tested against ImportError, and dummy methods are used when not available (mainly useful for Libervia)
2013-12-29 17:06:01 +01:00
souliane
7d3f74ef62 plugins text-syntaxes: added a default value to use the current user syntax in convert 2013-12-09 15:31:07 +01:00
Goffi
e743df999e plugin text syntaxes: clean_xhtml now accept lxml's HtmlElement to avoid parsing two times the same xml 2013-11-14 17:53:47 +01:00
Goffi
7fb9d0c309 plugin XEP-0071: rich messages management for sendMessage 2013-11-13 14:03:16 +01:00
Goffi
f1521f17c2 plugin text syntaxes: fixed bad parameter order for getParamA 2013-11-13 14:00:07 +01:00
Goffi
aed9972b34 plugin text syntaxes: fixed missing import 2013-11-12 14:51:32 +01:00
Goffi
5289df976f plugin text syntaxes: styles sanitisation 2013-11-12 14:14:36 +01:00
Goffi
c4afcee020 plugin text_syntaxes: fixed clean_xhml (it now return XHTML instead of HTML) 2013-11-09 10:16:35 +01:00
Goffi
83f28748dc plugin text syntaxes: this plugin manage rich text syntaxes conversions and cleaning. 2013-11-05 22:40:46 +01:00