mathieui
4e4ab569cf
Fix #2447 (OTR & HTML) -- partial WONTFIX
...
- 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-30 01:55:23 +02:00
mathieui
c3dd20fc74
Fix #2510 (link displayed twice in xhtml-im)
...
- also, fix the /xhtml command that was nesting one <body/> too many
2014-04-30 00:43:21 +02:00
mathieui
186803d9a9
Fix formatting, some typos, and unused code, and add docstrings
...
- 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-03-23 00:15:01 +01:00
Emmanuel Gil Peyrot
a64dd02118
Remove the dependency on poezio from xhtml.py
2014-02-22 01:11:57 +01:00
Emmanuel Gil Peyrot
9240bc3964
Move the XHTML-IM parser to SAX, to make it output a correct formatting, fixes #2239 and many more
2014-02-22 00:56:14 +01:00
Florent Le Coz
b12a6b3ba9
Improve the input a lot
...
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-10-20 23:42:13 +02:00
mathieui
31c2e23c4c
Logs errors by default, in a dedicated file
...
- 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-08-03 19:27:25 +02:00
mathieui
9b8ed569bb
Fix the regex for text attributes
2013-06-08 23:51:47 +02:00
Florent Le Coz
834546ac77
Do not traceback when receiving malformed XML in a xhtml-im body
2013-06-06 22:53:43 +02:00
mathieui
06e368f66e
Fix the parser for the rainbow plugin
2013-05-16 15:35:59 +02:00
mathieui
9de322bea3
Rewrite the poezio colors parser (also Fix #2279 )
...
The parser now handles text with multiple style attributes
(e.g. bold, underlined and red text).
2013-05-14 22:29:45 +02:00
mathieui
62787af607
Actually use the deprecated method for versions INFERIOR to 3.2
2013-04-19 23:55:54 +02:00
mathieui
93cdac01ae
Use ''.join(str) instead of str += …
...
Should improve speed on xhtml parsing, but be noticeable only
with *heavy* (e.g. 1000chars with the rainbow plugin) xhtml stanzas.
2013-04-18 19:54:13 +02:00
mathieui
cbf563583c
FIX XHTML ISSUES DUE TO A SLEEKXMPP UPDATE
...
(THE NAMESPACE WAS NOT PRESENT ANYMORE)
2013-03-06 22:53:42 +01:00
mathieui
f7204ab0a3
Fix /xhtml
2013-03-04 11:41:19 +01:00
mathieui
5a0cec9717
Fix a traceback due to a sleekxmpp API change
...
- remove the help message for people still using the old custom
sleekxmpp repo
2013-02-28 22:44:07 +01:00
mathieui
c5cc462963
Move to the upstream SleekXMPP
...
- 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
2013-01-17 17:37:06 +01:00
Florent Le Coz
21eeef5c7b
Implement the sending of underlined text in xhtml-im messages (C-c u).
...
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-07-29 03:36:05 +02:00
mathieui
0af1c7fe9a
Docstrings, and small cleanup
2012-05-21 02:14:25 +02:00
mathieui
ecc40fdc5e
Catch a possible exception when trying to retrieve the rgb value in curses
...
Fixes #2354
2012-05-13 19:01:27 +02:00
mathieui
93c17f8ece
Fixed #2328
2012-02-07 21:47:40 +01:00
mathieui
e74a640fdd
Do not crash when given a link without text
...
(e.g <a href="example.com"/>)
2012-01-30 01:10:41 +01:00
mathieui
632175b79f
Fix the xhtml parser (do not add wrong colors)
2011-11-11 23:55:31 +01:00
Florent Le Coz
b3072bd261
Merge branch 'master' into plugins
...
Conflicts:
src/tabs.py
src/xhtml.py
2011-11-08 02:15:57 +01:00
Florent Le Coz
d83eda6fd4
escape <, > and & in xhtml-im bodies.
2011-11-08 02:07:40 +01:00
Florent Le Coz
f13d03c149
poezio_colors_to_html now takes full colors (\x19xxx}) to generate the xhtml code
...
(cherry picked from commit 2b9a43ce6a
)
2011-11-08 00:16:35 +01:00
Florent Le Coz
2404358689
Fix the curses -> html color conversion
...
(cherry picked from commit 689f17cfd7
)
2011-11-08 00:15:41 +01:00
Florent Le Coz
f271ef0620
Add a function to convert ncurses colors to HTML color code.
...
(cherry picked from commit 04f103b9e6
)
2011-11-08 00:15:27 +01:00
Florent Le Coz
2b9a43ce6a
poezio_colors_to_html now takes full colors (\x19xxx}) to generate the xhtml code
2011-11-07 19:56:03 +01:00
Florent Le Coz
60b58301d3
Little cleanup
2011-11-07 19:55:40 +01:00
Florent Le Coz
689f17cfd7
Fix the curses -> html color conversion
2011-11-07 19:55:16 +01:00
Florent Le Coz
04f103b9e6
Add a function to convert ncurses colors to HTML color code.
2011-11-07 19:43:13 +01:00
Florent Le Coz
0315b05f51
Fix the sending of colors in private.
...
fixes #2287
2011-11-06 19:22:20 +01:00
Florent Le Coz
aa6738800d
Fix crash on completion of recent words containing xhtml-im attributes
...
fixes #2278
2011-10-20 21:55:24 +02:00
Florent Le Coz
c89d9a3aa4
use getiterator if python < 3.2
2011-09-29 23:19:21 +02:00
Florent Le Coz
5ac6b7f8dc
tg
2011-09-24 00:10:16 +02:00
Florent Le Coz
c7a0659a1d
merge
2011-09-24 00:02:09 +02:00
Emmanuel Gil Peyrot
6f1481e830
Really, really fix whitespace handling.
2011-09-23 23:50:43 +02:00
Emmanuel Gil Peyrot
8f675044b1
Really fix whitespace handling, and malformed CSS.
2011-09-23 23:47:25 +02:00
Florent Le Coz
1ff421075d
Do not remove trailing spaces in an XHTML-IM element’s text.
2011-09-23 23:01:13 +02:00
Florent Le Coz
a9d2cf8ff2
make colors work with 3-digits color numbers
2011-09-23 22:50:14 +02:00
Emmanuel Gil Peyrot
8845cdce8e
Fix whitespace handling in XHTML.
2011-09-23 00:20:34 +02:00
Emmanuel Gil Peyrot
e37f98aa5d
Add support for 256 colors in XHTML messages, and fix a stupid bug with img without @alt.
2011-09-23 00:09:01 +02:00
Emmanuel Gil Peyrot
00e12ccec1
Remove Elinks support and add a pure python XHTML/CSS parser.
2011-09-19 22:41:46 +02:00
Florent Le Coz
96794a4e49
Change license to zlib (MIT sucks :()
2011-09-11 17:10:05 +02:00
Florent Le Coz
d917ec5ea2
Do not print a message on the screen on error
2011-08-16 14:53:29 +02:00
mathieui
e27c6d74ad
fix the display of the action 'emptying the status', and some few minor changes
2011-06-04 20:15:18 +02:00
mathieui
2d570a4028
Fixes #2137 (altough it could have been done better)
2011-05-27 23:36:20 +02:00
mathieui
3d43517a41
Don’t break xhtml-im
2011-05-13 11:46:50 +02:00
mathieui
2860232cc6
Fix a traceback on C-c ❶ or C-c ², etc
2011-05-13 11:34:31 +02:00