summaryrefslogtreecommitdiff
path: root/src/xhtml.py
AgeCommit message (Collapse)Author
2016-06-11Move the src directory to poezio, for better cython compatibility.Emmanuel Gil Peyrot
2014-12-08Improve the xhtml_to_poezio_colors sanitizationmathieui
add some tests, and remove the test_datetime_tuple because of python time module misbehavior with timezones set manually. (potentially due to http://bugs.python.org/issue6478)
2014-12-08Sanitize the XHTML output by removing useless formatting charsmathieui
2014-10-31Merge branch 'master' of git.poez.io:poezio into slixmathieui
Conflicts: src/bookmark.py src/config.py src/connection.py src/core/commands.py src/core/core.py src/core/handlers.py src/windows/info_bar.py src/windows/muc.py src/windows/roster_win.py src/windows/text_win.py src/xhtml.py
2014-10-16Extract XHTML-IM inline imags by defaultmathieui
- Add two new options: tmp_image_dir and extract_inline_images - tmp_image_dir is $XDG_CACHE_HOME(usually ~/.cache)/poezio/images if unset - Name the images from a SHA-1 of their data and their mimetype - Output file:// links inside the message
2014-07-24Use slixmppFlorent Le Coz
2014-04-30Fix #2447 (OTR & HTML) -- partial WONTFIXmathieui
- Guess-parse the OTR messages in search for xhtml upon arrival - add a configurable option to decode it or not - We have XHTML-IM for a reason, and therefore we will *not* implement a full html parser for clients that dump whatever formatting inside the OTR payload (looking at you, pidgin)
2014-04-30Fix #2510 (link displayed twice in xhtml-im)mathieui
- also, fix the /xhtml command that was nesting one <body/> too many
2014-03-23Fix formatting, some typos, and unused code, and add docstringsmathieui
- No idea why subclasses of ConversationTab were working before (info_header was overriden with None in __init__) - Or why the date parsing worked (“Exeception”) - Some more reformatting with pylint indications - Document each module in the tabs module
2014-02-22Remove the dependency on poezio from xhtml.pyEmmanuel Gil Peyrot
2014-02-22Move the XHTML-IM parser to SAX, to make it output a correct formatting, ↵Emmanuel Gil Peyrot
fixes #2239 and many more
2013-10-20Improve the input a lotFlorent Le Coz
Noticeable changes: - The input "view" is smarter, it always move to a decent position so we can see enough text around the cursor. - The cursor goes at the end of the input when pasting some long text - The formatting chars (^C and o, b, a, 1, 2, 3 etc) are now visible in the input. This makes it a lot easier to know where these special characters are, to change them and efficiently edit our text (we just lose a little, on the cosmetic side, but who cares) - The code is actually a lot simpler in the functions to move the cursor, insert/delete chars: we do not have to deal with special cases where the formatting characters are actually composed of two chars. fixes #2183
2013-08-03Logs errors by default, in a dedicated filemathieui
- log_errors option, true by default - errors go in log_dir/errors.log (so $XDG_DATA_HOME/errors.log by default) This should help a lot for debugging, and provide a way for people to easily give debug traces without useless or personal infos.
2013-06-08Fix the regex for text attributesmathieui
2013-06-06Do not traceback when receiving malformed XML in a xhtml-im bodyFlorent Le Coz
2013-05-16Fix the parser for the rainbow pluginmathieui
2013-05-14Rewrite the poezio colors parser (also Fix #2279)mathieui
The parser now handles text with multiple style attributes (e.g. bold, underlined and red text).
2013-04-19Actually use the deprecated method for versions INFERIOR to 3.2mathieui
2013-04-18Use ''.join(str) instead of str += …mathieui
Should improve speed on xhtml parsing, but be noticeable only with *heavy* (e.g. 1000chars with the rainbow plugin) xhtml stanzas.
2013-03-06FIX XHTML ISSUES DUE TO A SLEEKXMPP UPDATEmathieui
(THE NAMESPACE WAS NOT PRESENT ANYMORE)
2013-03-04Fix /xhtmlmathieui
2013-02-28Fix a traceback due to a sleekxmpp API changemathieui
- remove the help message for people still using the old custom sleekxmpp repo
2013-01-17Move to the upstream SleekXMPPmathieui
- remove the decline command that is not in the trunk (and mediated declines are supported nowhere anyway) - change a bit xhtml-im support - change the bookmarks management a bit - Add a verification to avoid crashing when poezio will be launched the next time - Fix the (unrelated) bug when setting a jid affiliation
2012-07-29Implement the sending of underlined text in xhtml-im messages (C-c u).Florent Le Coz
Note that a portion of text can NOT have a color AND be underlined at the same time, but it's not really tragic (see comment in source code).
2012-05-21Docstrings, and small cleanupmathieui
2012-05-13Catch a possible exception when trying to retrieve the rgb value in cursesmathieui
Fixes #2354
2012-02-07Fixed #2328mathieui
2012-01-30Do not crash when given a link without textmathieui
(e.g <a href="example.com"/>)
2011-11-11Fix the xhtml parser (do not add wrong colors)mathieui
2011-11-08Merge branch 'master' into pluginsFlorent Le Coz
Conflicts: src/tabs.py src/xhtml.py
2011-11-08escape <, > and & in xhtml-im bodies.Florent Le Coz
2011-11-08poezio_colors_to_html now takes full colors (\x19xxx}) to generate the xhtml ↵Florent Le Coz
code (cherry picked from commit 2b9a43ce6a5fa6ad93ab570a99d4d92337a40110)
2011-11-08Fix the curses -> html color conversionFlorent Le Coz
(cherry picked from commit 689f17cfd79b152d3ca75e570f9f13f70aa6c425)
2011-11-08Add a function to convert ncurses colors to HTML color code.Florent Le Coz
(cherry picked from commit 04f103b9e67ccd1de7376be4f7b5156ec425e99c)
2011-11-07poezio_colors_to_html now takes full colors (\x19xxx}) to generate the xhtml ↵Florent Le Coz
code
2011-11-07Little cleanupFlorent Le Coz
2011-11-07Fix the curses -> html color conversionFlorent Le Coz
2011-11-07Add a function to convert ncurses colors to HTML color code.Florent Le Coz
2011-11-06Fix the sending of colors in private.Florent Le Coz
fixes #2287
2011-10-20Fix crash on completion of recent words containing xhtml-im attributesFlorent Le Coz
fixes #2278
2011-09-29use getiterator if python < 3.2Florent Le Coz
2011-09-24tgFlorent Le Coz
2011-09-24mergeFlorent Le Coz
2011-09-23Really, really fix whitespace handling.Emmanuel Gil Peyrot
2011-09-23Really fix whitespace handling, and malformed CSS.Emmanuel Gil Peyrot
2011-09-23Do not remove trailing spaces in an XHTML-IM element’s text.Florent Le Coz
2011-09-23make colors work with 3-digits color numbersFlorent Le Coz
2011-09-23Fix whitespace handling in XHTML.Emmanuel Gil Peyrot
2011-09-23Add support for 256 colors in XHTML messages, and fix a stupid bug with img ↵Emmanuel Gil Peyrot
without @alt.
2011-09-19Remove Elinks support and add a pure python XHTML/CSS parser.Emmanuel Gil Peyrot