1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00
Commit Graph

1044 Commits

Author SHA1 Message Date
Witold Filipczyk
c29e4f3428 [forms] str2type const char * 2022-01-30 14:39:44 +01:00
Witold Filipczyk
2f53629fea [format] signed short . Compilation fix 2022-01-29 17:03:55 +01:00
Witold Filipczyk
cea2521b91 [encoding] enum stream_encoding -> stream_encoding_T 2022-01-28 16:17:25 +01:00
Witold Filipczyk
09e7b73a41 [renderer] enum link_state -> link_state_T, enum color_flags -> color_flags_T 2022-01-28 16:11:54 +01:00
Witold Filipczyk
349a27238f [align] enum format_align -> format_align_T 2022-01-28 16:05:35 +01:00
Witold Filipczyk
28a263eac7 [uri] enum uri_component -> uri_component_T 2022-01-28 15:56:59 +01:00
Witold Filipczyk
9dd12f7515 [html] enum html_element_pseudo_class -> html_element_pseudo_class_T 2022-01-28 15:47:40 +01:00
Witold Filipczyk
5b0ec2c4f2 [form] added default 2022-01-28 15:44:49 +01:00
Witold Filipczyk
86f18c2079 [form] enum form_mode -> form_mode_T 2022-01-28 15:37:59 +01:00
Witold Filipczyk
0f3be4d4fe [html] enum format_list_flag -> format_list_flag_T 2022-01-28 15:35:04 +01:00
Witold Filipczyk
1a8eee4ce4 [css] enum css_selector_type -> css_selector_type_T 2022-01-28 15:30:59 +01:00
Witold Filipczyk
58c07356b9 [format] enum text_style_format -> text_style_format_T 2022-01-28 15:16:34 +01:00
Witold Filipczyk
199f1c60ff [draw] enum screen_char_attr -> screen_char_attr_T 2022-01-28 14:47:36 +01:00
Witold Filipczyk
d839efc9f4 [color] enum color_mode -> color_mode_T 2022-01-28 14:42:48 +01:00
Witold Filipczyk
e57bae65d3 [draw] enum border_char -> border_char_T 2022-01-28 14:30:01 +01:00
Witold Filipczyk
f536645e58 [form] str2form returned type enum form_type 2022-01-28 13:59:25 +01:00
Witold Filipczyk
76f525bcb9 [css] enum css_token_type -> unsigned int 2022-01-26 18:41:03 +01:00
Witold Filipczyk
c399ac257c [html] cast 2022-01-25 18:02:25 +01:00
Witold Filipczyk
dea07293e7 [css] cast 2022-01-25 17:46:03 +01:00
Witold Filipczyk
f359d8e97b [dom] cast 2022-01-24 19:52:46 +01:00
Witold Filipczyk
2fa67c5730 [char] Introduced macro C_
C_("aaaa") -> (char *)("aaaa")
2022-01-19 22:49:13 +01:00
Witold Filipczyk
de2a787900 [strstr] no cast 2022-01-18 20:55:08 +01:00
Witold Filipczyk
e62b301657 [strrchr] Drop cast to const char * 2022-01-18 20:42:29 +01:00
Witold Filipczyk
53a860a3d6 [strchr] casting first parameter to const char * was not a good idea 2022-01-18 20:30:48 +01:00
Witold Filipczyk
8999a19593 [cast] Explicit casts for narrowing conversions 2022-01-17 17:07:46 +01:00
Witold Filipczyk
881f896e85 [mem_calloc] Cast 2022-01-16 21:08:50 +01:00
Witold Filipczyk
be8a030fa7 [mem_realloc] cast return value 2022-01-16 19:38:30 +01:00
Witold Filipczyk
20c161559c [mem_alloc] cast return value 2022-01-16 19:09:27 +01:00
Witold Filipczyk
b434b11309 [options] 0 (option_flags) -> OPT_ZERO 2022-01-15 20:10:37 +01:00
Witold Filipczyk
a3eb8a369d [uri] Silly change to static char[] instead const char * to avoid warning 2022-01-15 19:08:39 +01:00
Witold Filipczyk
0e8ee7876a [uri] 0 -> URI_NONE in get_uri to decrease number of warnings 2022-01-14 20:52:17 +01:00
Witold Filipczyk
de2bf98680 [option] const char * 2022-01-13 20:13:13 +01:00
Witold Filipczyk
fec54a50e9 [string] Cast to void to avoid warning
In this case NULL is checked elsewhere.
2022-01-09 17:06:25 +01:00
Witold Filipczyk
87f18b53a0 [string] Check for NULL 2022-01-04 16:40:28 +01:00
Witold Filipczyk
cd1193bf38 [string] Check for NULL. 2022-01-04 16:34:02 +01:00
Witold Filipczyk
5a14b61c0d [register] Drop register
Compilers are smart and don't need such hints.
2021-12-03 12:34:00 +01:00
Witold Filipczyk
4617d7d8ef [xml] missing files 2021-11-22 09:50:57 +01:00
Witold Filipczyk
0e45f743a7 [link] cast to unsigned char . Refs #132
This bug was caused by changes unsigned char * -> char *
2021-11-19 15:31:05 +01:00
Witold Filipczyk
98b3f14927 [quickjs] forms also as array
Sometimes it works, sometimes not.
2021-11-15 17:13:51 +01:00
Witold Filipczyk
26a319e581 [quickjs] form.c 2021-11-02 20:49:03 +01:00
Witold Filipczyk
dc12c13244 [quickjs] Test commit. window.alert('Blabla') works. 2021-10-17 18:17:48 +02:00
Witold Filipczyk
33d8c551ea [ecmascript] debug in check_for_rerender 2021-10-07 18:27:21 +02:00
Witold Filipczyk
b84cfb1360 [document] Try to not parse js again 2021-10-05 20:11:18 +02:00
Witold Filipczyk
9f52b04f2a [links] Added bool document.browse.links.show_goto . Refs #127 2021-09-23 11:36:26 +02:00
Witold Filipczyk
df9cb9dc5a [forms] Try to JS_SetElement 2021-09-16 20:26:20 +02:00
Witold Filipczyk
8f2ff7cd82 [document] discard_comb_x_y in reset_document 2021-09-11 19:36:03 +02:00
Witold Filipczyk
5f6ca9838f [xml] std::string -> xmlpp::ustring 2021-09-08 10:56:54 +02:00
Witold Filipczyk
b1317c3e46 [plain] one level of indentation less 2021-08-10 18:21:01 +02:00
Witold Filipczyk
d43028a0cf [plain] Optimisation 2021-08-10 17:38:42 +02:00
Witold Filipczyk
dd332080ce [plain] Another cases 2021-08-10 17:07:43 +02:00
Witold Filipczyk
ac0ecf5398 [plain] Missing TEE 2021-08-10 17:01:31 +02:00
Witold Filipczyk
62f7af1443 [plain] document.plain.fixup_tables
Option to draw nice-looking tables.
Examples:
mysql --pager=elinks
lxc ls | elinks
2021-08-10 16:44:53 +02:00
Witold Filipczyk
66305fcb50 [gettext] try system gettext. Refs #62
Now, only meson was changed.
-Dnls=true -Dgettext=true
2021-08-08 21:25:08 +02:00
Witold Filipczyk
86edf56482 [xml] Do not override headers if they did not change. 2021-08-07 20:50:36 +02:00
Witold Filipczyk
a5c6adb7db [xml] Do not override all headers
I have no better idea how to preserve headers and set utf-8.
2021-08-07 20:45:59 +02:00
Witold Filipczyk
4df9538c40 [iframe] Silent compiler 2021-08-06 19:06:47 +02:00
Witold Filipczyk
a5a243546c [plain] More ifdefs to silent compiler 2021-08-06 19:03:53 +02:00
Witold Filipczyk
418e74a51b [plain] Decode 256 colors sequences 2021-08-06 14:32:32 +02:00
Witold Filipczyk
0401fd58dc [plain] Decode 24 bit color sequences 2021-08-04 10:30:53 +02:00
Witold Filipczyk
857c819da1 [iframe] next|prev frame when there is no link current doc_view 2021-08-02 20:08:45 +02:00
Witold Filipczyk
64d5a4f1dd [iframes] Small step forward.
Allow to scroll in iframe which is bigger than screen.
2021-08-01 19:56:02 +02:00
Witold Filipczyk
0ef0470191 [iframes] added document.html.display_iframes option 2021-07-31 17:11:53 +02:00
Witold Filipczyk
83a359005b [iframes] Do not format strange frame 2021-07-31 16:14:44 +02:00
Witold Filipczyk
199237820e [iframes] Fix issue when clicking link in iframe 2021-07-31 15:24:36 +02:00
Witold Filipczyk
9bf5494d10 [iframes] Draw frame around iframe. 2021-07-31 14:48:13 +02:00
Witold Filipczyk
7a5adbc328 [iframe] off by one 2021-07-30 20:43:46 +02:00
Witold Filipczyk
1de4b3def3 [iframe] Set y position 2021-07-29 21:22:52 +02:00
Witold Filipczyk
a945d47584 [iframes] No progress today 2021-07-28 21:22:47 +02:00
Witold Filipczyk
2670444590 [iframes] include 2021-07-27 21:05:07 +02:00
Witold Filipczyk
734028277c [iframe] Small progress. 2021-07-26 21:28:19 +02:00
Witold Filipczyk
06d50a9ccc [iframe] Copy-paste programming does not work 2021-07-25 23:07:05 +02:00
Witold Filipczyk
2c3632f012 [iframe] Try to define interface 2021-07-24 21:09:25 +02:00
Witold Filipczyk
cef822653d [iframe] Just to commit today. 2021-07-23 21:09:22 +02:00
Witold Filipczyk
ae02be3b6e [iframe] Make space for iframe 2021-07-22 16:20:21 +02:00
Witold Filipczyk
eb347221d2 [iframe] Do not "download" iframe link if it has no height 2021-07-20 16:11:16 +02:00
Witold Filipczyk
ec44f8a6fb [iframe] Try to load iframes. Now they are not displayed, but dowloaded. 2021-07-20 15:07:25 +02:00
Witold Filipczyk
927b8fc1a6 [js] moved check_for_rerender to ecmascript.c 2021-07-20 10:05:58 +02:00
Witold Filipczyk
221f246d4c [iframe] Begining of iframe rewrite 2021-07-19 22:12:03 +02:00
Witold Filipczyk
8b76c1331d [document] free text allocated by renderer2 2021-07-18 13:35:31 +02:00
Witold Filipczyk
347b1d43ae [xml] Do not build tags and tables. 2021-07-18 12:28:57 +02:00
Witold Filipczyk
147f5e3e27 [xhtml] Removed some code. Rely on original renderer 2021-07-17 19:44:51 +02:00
Witold Filipczyk
e1fbc48d9a [scroll] This time scroll3 is tolerable. 2021-07-17 19:03:51 +02:00
Witold Filipczyk
782b4e00f0 [tables] Change of mind. Just render whole document with old renderer. 2021-07-16 19:52:31 +02:00
Witold Filipczyk
33fc1beefd [xml] dump_document_structure in header file 2021-07-15 15:42:40 +02:00
Witold Filipczyk
f1d89f7340 [table] one step closer 2021-07-14 15:45:02 +02:00
Witold Filipczyk
a2620814dd [xml] parse_table_attributes 2021-07-13 16:30:22 +02:00
Witold Filipczyk
94a5288336 [tables] some static functions now are in global scope 2021-07-12 17:34:22 +02:00
Witold Filipczyk
74b84d688f [tables] Uncompilable code 2021-07-11 17:10:11 +02:00
Witold Filipczyk
9b93936564 [css] Temporarily disabled 2021-07-10 14:25:27 +02:00
Witold Filipczyk
d4f280d325 [configure.ac] Compile with libxml++-5.0
Note, disable CSS if do not want segfaults
2021-07-09 17:52:15 +02:00
Witold Filipczyk
7328da1756 [xml] Begining tables 2021-07-08 17:28:39 +02:00
Witold Filipczyk
cd8e128e5a [xml] utf-8
It concerns pages modified by js, especially not utf8 encoding.
2021-07-07 18:05:25 +02:00
Witold Filipczyk
c12eeb95b0 [xhtml] Disabled by default 2021-07-06 14:55:28 +02:00
Witold Filipczyk
9a6a09450b [color] unsigned char * -> char * 2021-07-04 12:50:01 +02:00
Witold Filipczyk
dc9b4bed04 [gemini] Changes to see labirynth 2021-07-03 14:34:16 +02:00
Witold Filipczyk
d237b06511 [js] document.write adds text at the end of document
It is not ok, but better than inserting code at the beginning.
2021-07-03 12:55:36 +02:00
Witold Filipczyk
391d463a46 [gemini] Show error page for some errors. 2021-07-03 09:45:11 +02:00
Witold Filipczyk
61247f6a32 [text/gemini] Do not expect space 2021-07-02 22:13:09 +02:00
Witold Filipczyk
623e0738df [gemini] strncmp for readability 2021-07-02 15:21:39 +02:00
Witold Filipczyk
2f1e2fc58b [gemini] add_html_to_string 2021-07-02 15:11:37 +02:00
Witold Filipczyk
40e2865705 [gemini] One link per line. Fix for links without descriptions. 2021-07-01 21:01:02 +02:00
Witold Filipczyk
5ed65c8733 [gemini] text/gemini 2021-07-01 20:18:29 +02:00
Witold Filipczyk
a910dda61b [textarea] Fixes
Still not functional:
document.write
css
tables
and others
2021-07-01 15:33:42 +02:00
Witold Filipczyk
30226a1b11 [select] test/select.html is displayable 2021-06-30 16:20:57 +02:00
Witold Filipczyk
d55ea80fe6 [select] Modifications related to select. test/select.html still broken 2021-06-29 21:58:04 +02:00
Witold Filipczyk
3af2c6f2d9 [tables] Temporarily disable tables rendering 2021-06-28 20:41:23 +02:00
Witold Filipczyk
fa49422f88 [document] Programming by coincidence.
scroll3 works, width.html works, accesskey still does not
2021-06-27 13:01:19 +02:00
Witold Filipczyk
c09de3eb91 [xml] scroll3 works, but is very slow 2021-06-26 10:44:30 +02:00
Witold Filipczyk
488ee2ea59 [xml] onload 2021-06-25 18:25:40 +02:00
Witold Filipczyk
e52c6fe4ea [js] some examples works, some don't 2021-06-25 18:08:38 +02:00
Witold Filipczyk
4f7aacd7ef [margin] Set margin 2021-06-24 20:26:07 +02:00
Witold Filipczyk
70a42d7656 [tags] Set html_context->putsp = HTML_SPACE_ADD at the start of ending element 2021-06-24 20:00:43 +02:00
Witold Filipczyk
df534ef818 [xml] blockquote without tables 2021-06-24 17:28:31 +02:00
Witold Filipczyk
705cd7f113 [test] align.html is displayable 2021-06-23 20:42:58 +02:00
Witold Filipczyk
16c6926990 [xml] local directory listings are functional 2021-06-22 17:54:10 +02:00
Witold Filipczyk
d5b27592a1 [meson] compilation fixes related to CSS 2021-06-21 21:01:37 +02:00
Witold Filipczyk
ba3af06b40 [xhtml] code is compilable, but likely non-functional 2021-06-20 22:38:17 +02:00
Witold Filipczyk
e3852637ff [tags] select 2021-06-19 14:45:38 +02:00
Witold Filipczyk
29e6d7971c [xml] uncommented xmp 2021-06-18 17:20:20 +02:00
Witold Filipczyk
ddb52742bd [tags] More code adjusted for xml++ 2021-06-17 15:20:09 +02:00
Witold Filipczyk
d39dc85fa1 [xml] source . select intentionally ommitted. 2021-06-16 20:46:31 +02:00
Witold Filipczyk
071f9f219a [xml] Test commit. Line 3200 2021-06-15 22:14:29 +02:00
Witold Filipczyk
8be72ca243 [source] Show source files after libxml++ parsing. 2021-06-13 16:41:54 +02:00
Witold Filipczyk
9328fa261e [libdom] libdom also retired 2021-06-12 17:37:11 +02:00
Witold Filipczyk
908fa22878 [htmlcxx] htmlcxx retired 2021-06-12 13:29:05 +02:00
Witold Filipczyk
201a61b14f [document] Try to free memory of document->dom in document_done 2021-06-10 15:01:15 +02:00
Witold Filipczyk
d6df9584c9 Merge branch 'master' into getlementbyid 2021-05-26 08:29:47 +02:00
Witold Filipczyk
63d892838c [getElementById] small success. see test/ecmascript/element.html
Now memory leaks, etc. are not taken into account.
For the beginning I will implement read properties.
2021-05-02 17:27:35 +02:00
Witold Filipczyk
7ba9caf227 [document] Show IP also for idn domains. 2021-04-28 16:24:20 +02:00
Witold Filipczyk
c45c98438f [configure.ac] Added htmlcxx 2021-04-20 21:19:23 +02:00
Witold Filipczyk
1fa5504570 [htmlcxx] Added htmlcxx parser for source code displaying
It is compilable only together with spidermonkey, and only with meson
for now.
2021-04-18 18:26:58 +02:00
Witold Filipczyk
fa6bfc0241 [hr] Cast to unsigned char. Refs #116 2021-04-12 22:01:12 +02:00
Witold Filipczyk
dcc8717d89 [tables] Condition for negative x in the expand_lines function. Refs #112 2021-03-28 21:02:03 +02:00
Witold Filipczyk
d4a1ce5a38 [blockquote] Rewritten a bit. Refs #112
It does not crash on test file and shows > for pior test cases.
2021-03-28 12:14:43 +02:00
Witold Filipczyk
409a7ebea4 [blockquote] Does not crash for me, but does not show > . Still broken. Refs #112 2021-03-25 20:43:06 +01:00
Witold Filipczyk
b4045ef864 [blockquote] Added condition for y. Refs #112 2021-03-25 18:18:17 +01:00
Witold Filipczyk
eecb907585 [blockquote] Workaround for segfault on distrowatch 2021-03-16 13:14:02 +01:00
Witold Filipczyk
089189638b [blockquote] More draw_blockquote_chars. Refs #103 2021-03-15 20:20:15 +01:00
Witold Filipczyk
602290b73b [blockquote] Prefix also caption. Added draw_blockquote_chars. Refs #103 2021-03-15 20:06:12 +01:00
Witold Filipczyk
bb01193671 [blockquote] Prefix also frame chars. Refs #103 2021-03-14 15:37:40 +01:00
Witold Filipczyk
a2c95f3f45 [blockquote] Try to prefix with > also tables. Refs #103
It was not tested too much, especially for longer texts.
There can be some bad offsets.
2021-03-13 20:04:27 +01:00
Witold Filipczyk
6acac0fc46 [blockquote] add > in move_chars. Refs #103 2021-03-09 18:36:53 +01:00
Witold Filipczyk
14c4584cde [blockquoute] > starts with the same column. Refs #103 2021-03-09 18:17:39 +01:00
Witold Filipczyk
c72569d723 [blockquote] Changed rendering of blockquote. Refs #103
Previously blockquote was adding two spaces to the left margin.
Now it adds >.
It is not finished yet, needs some testing and feedback.
2021-03-08 22:10:20 +01:00
Witold Filipczyk
acbcfd2eba [char] More casts to unsigned char 2021-02-27 09:51:23 +01:00
Witold Filipczyk
6ea0aa44a1 [renderer] Cast to unsigned char. Refs #94 2021-02-26 21:26:45 +01:00
nobody@earth.com
f953744189 [smjs document replace] fixed property location, replace and writeln functions, tests 2021-02-24 11:23:34 +01:00
Witold Filipczyk
0fea79cc8f [cflags] Removed -Wno-pointer-sign
Likely some new bugs were introduced by this change.
The long term goal is clean compilation by g++.
2021-01-02 16:20:27 +01:00
Witold Filipczyk
d1ecd45828 [mozjs52] It compiles, but often segfaults. No idea yet how to fix it. 2020-10-27 14:53:24 +01:00
Witold Filipczyk
1f57e72212 [mozjs24] Allow build elinks with g++
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.

Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
2020-10-05 20:14:55 +02:00
Witold Filipczyk
c8acb75bcd [pre] Wrap text in pre (SHIFT-w by default). Refs #69 2020-09-19 21:48:53 +02:00
Witold Filipczyk
5f87bdbcb2 [meson] meson build scripts.
Not finished yet, but I added to motivate myself and others.
The goal is to get a few seconds faster builds.

autotools still will be available.
2020-09-05 22:06:01 +02:00
Witold Filipczyk
6a960a9fb9 [viewer] New action mark-clipboard. Refs #10
Possibility to mark rectangle for clipboard.
User may bind keys to move-cursor-up, move-cursor-down, move-cursor-left,
move-cursor-right and mark-clipboard.
mark-clipboard is tristate.
First triggerred, it remembers left top corner of rectangle. Now you can move cursor.
Second time triggerred, remembers right bottom corner of rectangle.
Third time, it clears selection.

The copy-clipboard action was changed. Now if the clipboard rectangle is marked,
it copies this rectangle. If not, the current link.
2020-08-01 23:25:21 +02:00
Witold Filipczyk
5c57cf6270 [fragment] Do not move to the top, when nonexisting fragment is in current document. Refs #42
Behaviour similar to bigger browsers.
2020-04-28 19:13:36 +02:00
Witold Filipczyk
3d96b0d7d7 Revert "Compile with C++."
This reverts commit 4f4df33638.
2019-04-21 12:27:40 +02:00
Witold Filipczyk
4f4df33638 Compile with C++.
Weak points:
- alignof
- js problems

Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
2019-02-17 20:46:16 +01:00
أحمد المحمودي (Ahmed El-Mahmoudy)
dbab898f38 Fix spelling mistakes 2019-01-14 04:51:10 +01:00
Witold Filipczyk
6dfdd36398 form_control -> el_form_control 2018-09-09 19:18:53 +02:00
Witold Filipczyk
d8be2c505e Rename struct box to struct el_box.
In the future I want to copy some code from netsurf, so I'm preparing.
2018-09-09 19:14:56 +02:00
Witold Filipczyk
7a006b6dd2 Rewritten searching. Refs #21
Before only visible part of screen was searched for pattern.
Now whole document is searched, and beginings of found text
is remembered in document->search_points.
2018-04-14 21:49:52 +02:00
Witold Filipczyk
3b279e5ec6 No warning 2018-03-10 10:36:25 +01:00
Witold Filipczyk
c9a0df7a67 This condition was useless IMO. 2017-11-26 11:03:02 +01:00
rkd77
d539a45c98
Merge pull request #3 from aelmahmoudy/color_link_num
Allow link number colors to be changed.
2017-11-26 10:58:04 +01:00
Witold Filipczyk
48ba074969 mem_free_set instead two lines 2017-11-23 10:33:10 +01:00
rkd77
be719e1ac1
Merge pull request #10 from aelmahmoudy/select_forms
Make select forms look more like other forms.
2017-11-22 12:02:06 +01:00
rkd77
77ea5759ed
Merge pull request #9 from aelmahmoudy/preferred_document_width_option
Add preferred_document_width option.
2017-11-22 11:59:17 +01:00
rkd77
addd051c97
Merge pull request #6 from aelmahmoudy/dont_underline_unselected_forms
Dont underline unselected forms
2017-11-22 11:54:50 +01:00
rkd77
baf0c5b689
Merge pull request #4 from aelmahmoudy/color_textarea
Provide different color for text areas in insert mode.
2017-11-22 11:51:10 +01:00
rkd77
2b786ac7fe
Merge pull request #2 from aelmahmoudy/underline_links
Underline links even in numbered links mode
2017-11-22 11:42:02 +01:00
Nils Dagsson Moskopp
aae79c95fe Add rendering for html source element 2017-11-22 03:19:33 +01:00
Yozo Hida
49988d305f Do not underline forms (unless selected). 2017-11-22 01:16:50 +01:00
Yozo Hida
948d019fc0 Add preferred_document_width option.
Option document.browse.preferred_document_width controls the
width of the document, so that documents are rendered with narrower
width than screen width.  Makes it easier to read paragraphs.

Patch originally from Shalon Wood <dstar@pele.cx>, see bug #1063.

Instead of using max_document_width as the hard limit to the document
width, it uses a soft limit, where if the document does not fit (due to
tables, etc.), then larger width is used.  This reduces the need for
horizontal scrolling for wide documents.

Also added toggle-document-width action to toggle between preferred
width and full screen width.  This is bound to 'M' by default.  Initial
toggle status is determined by document.browse.use_preferred_document_width
option.

During dumps, document.dump.width option is still used.  Perhaps we
should consolidate document.dump.width option with
document.browse.preferred_document_width ?
2017-11-21 16:09:13 +01:00
Yozo Hida
7e58737619 Make select forms look more like other forms.
Insert "[_" and "_]" as part of the form link, and
include it as part of the link.
2017-11-21 16:06:33 +01:00
Yozo Hida
4ed958b067 Provide different color for text areas in insert mode.
The color is controlled by

  document.browse.links.active_link.insert_mode_colors.background
  document.browse.links.active_link.insert_mode_colors.text

Also avoid overloading local variable "i" in get_current_link().
2017-11-21 16:00:39 +01:00
Yozo Hida
a4d8f25a9c Allow link number colors to be changed.
These settings are specified by

  document.colors.link_number
  document.colors.use_link_number_color

The latter setting determines whether the color is used when document
colors are being used.

See bug #1050.
2017-11-21 15:56:32 +01:00
Yozo Hida
468e7aaff9 Underline links even in numbered links mode 2017-11-21 15:50:23 +01:00
Marco Migliori
5e31308da0 text direction mark 2017-05-16 20:57:25 +02:00
Witold Filipczyk
6d78cf1c23 Set encoding 2016-12-13 17:43:56 +01:00
Witold Filipczyk
6777006d73 Code reuse 2016-12-13 10:37:27 +01:00
Witold Filipczyk
5a217e37df Empty text node is '\n' 2016-12-11 21:18:14 +01:00
Witold Filipczyk
06fb11baee Experimental html source highlight using libdom 2016-12-11 16:52:44 +01:00
Witold Filipczyk
2fc9b0bf5a Better handling of content-disposition (line without semicolon)
This time it was copied from links2.
2016-08-21 22:02:46 +02:00
Witold Filipczyk
ab63ee8f82 Revert "Fix saving files from speccy.pl archives"
This reverts commit 29d85fdb3b.
2016-08-21 18:22:33 +02:00
Witold Filipczyk
29d85fdb3b Fix saving files from speccy.pl archives 2016-05-28 17:58:17 +02:00
Witold Filipczyk
257422f28c Reorganisation of code to make C++ happy 2016-04-20 22:21:31 +02:00
Witold Filipczyk
da15322705 Cast to (const char *) in strrchr calls 2016-04-20 21:03:27 +02:00
Witold Filipczyk
96e65c105f Explicit cast in strstr for C++ 2016-04-20 20:46:33 +02:00
Witold Filipczyk
1b06539694 Explicit cast to (const char *) in strcasestr for C++ 2016-04-20 20:11:08 +02:00
Witold Filipczyk
52d6f37c8e Explicit cast to (const char *) for strchr function (C++) 2016-04-20 19:43:37 +02:00
Witold Filipczyk
67673f5fe5 new -> new_ for C++ compatibility 2016-04-20 18:42:22 +02:00
Witold Filipczyk
f4981bb553 class -> class_ for C++ compatibility 2016-04-20 18:18:27 +02:00
Witold Filipczyk
2e721e051a template -> template_ for C++ compatibility 2016-04-20 18:05:00 +02:00
Fabienne Ducroquet
13f3da8416 Improve isolated combining characters handling
If there are isolated combining characters, e.g. at the beginning of a paragraph
or table cell:
– if it’s not the first screen column, combine them with whatever character is
printed to their left;
– otherwise, add a no-break space as the base character.

Previously, such combining characters were combined with the last letter
displayed, i.e. the last letter of the previous paragraph or cell.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2016-04-12 21:59:50 +02:00
Fabienne Ducroquet
a43ec1075c Display combining characters at the end of the current string in set_hline
without waiting for the next non zero width character. This way combining
characters at the end of the document are displayed.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2016-04-12 21:58:54 +02:00
Fabienne Ducroquet
c1140f54c4 Compute correct number of cells with CONFIG_COMBINE
Otherwise, there are unnecessary spaces at the end of lines in tables containing
combining characters.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2016-04-12 21:41:53 +02:00
Fabienne Ducroquet
ec30a09a36 Bug 1139: Fix internal error: "bad split" with CONFIG_COMBINE
A combining character sequence where the base character is a space remained
recorded as a space although the initial space was replaced with an internal
code corresponding to the combined character. This caused an internal error when
ELinks tried to split the line at that place and did not find the space.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2016-04-12 21:41:49 +02:00
Witold Filipczyk
4efea7e314 Added support for label_key in references of dumps.
Added base parameter to dec2qwerty and qwerty2dec to avoid strlen calls
im dumps.
2016-02-07 11:51:17 +01:00
Witold Filipczyk
69986f1bd1 Multiplication instead of pow calls and minor style changes. 2016-01-31 12:38:18 +01:00
Martin Miller
28b7bd1ec2 Transfer changes for ascii link labeling 2016-01-31 10:23:08 +01:00
Witold Filipczyk
c84dfd7e18 mem_free_if where aplicable. Initialised memory in encoding/* 2015-05-10 17:27:55 +02:00
Witold Filipczyk
ca4d770c0b Revert "Apply styles of html element for body element."
This reverts commit 5f9b54f594.
2015-05-09 22:11:13 +02:00
Witold Filipczyk
46767f6bf0 Introduced the document.browse.show_refresh_link option.
Whether to show Refresh: link line. Default 1.
2015-01-02 14:53:18 +01:00
Fabienne Ducroquet
b2bc6f5049 Add support for the CSS list-style-type property
Use the same functions as for the list-style property since only the "type" part
of the list-style property is supported at this stage.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2013-09-07 10:52:01 +02:00
Fabienne Ducroquet
ad7ff0386d Changes in the handling of the format flags for list elements
* Rename P_STAR as P_DISC and P_PLUS as P_SQUARE.

* Delete P_NONE because it was used only as the default flag in init_html_parser
  and a list with P_NONE then got bullets, so instead use P_DISC by default (as
  per the CSS specification), and P_NO_BULLET for lists with no bullets.

* Use as bullets the characters:
  - U+25E6 WHITE BULLET for the circle style;
  - U+25AA BLACK SMALL SQUARE (alias square bullet) for the square style;
  - U+2022 BULLET for the disc style (default).

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
2013-09-07 10:51:54 +02:00
Kalle Olavi Niemitalo
8b00e1ef70 bug 764: Initialize the right member of union option_value
INIT_OPTION used to initialize union option_value at compile time by
casting the default value to LIST_OF(struct option) *, which is the
type of the first member.  On sparc64 and other big-endian systems
where sizeof(int) < sizeof(struct list_head *), this tended to leave
option->value.number as zero, thus messing up OPT_INT and OPT_BOOL
at least.  OPT_LONG however tended to work right.

This would be easy to fix with C99 designated initializers,
but doc/hacking.txt says ELinks must be kept C89 compatible.
Another solution would be to make register_options() read the
value from option->value.tree (the first member), cast it back
to the right type, and write it to the appropriate member;
but that would still require somewhat dubious conversions
between integers, data pointers, and function pointers.

So here's a rather more invasive solution.  Add struct option_init,
which is somewhat similar to struct option but has non-overlapping
members for different types of values, to ensure nothing is lost
in compile-time conversions.  Move unsigned char *path from struct
option_info to struct option_init, and replace struct option_info
with a union that contains struct option_init and struct option.
Now, this union can be initialized with no portability problems,
and register_options() then moves the values from struct option_init
to their final places in struct option.

In my x86 ELinks build with plenty of options configured in, this
change bloated the text section by 340 bytes but compressed the data
section by 2784 bytes, presumably because union option_info is a
pointer smaller than struct option_info was.
(cherry picked from elinks-0.12 commit e5f6592ee2)

Conflicts:
	src/protocol/fsp/fsp.c: All options had been removed in 0.13.GIT.
	src/protocol/smb/smb2.c: Ditto.
2012-11-03 22:16:32 +02:00
Kalle Olavi Niemitalo
87eac68dc3 Fix "parameter has incomplete type" on GCC 3.4.6
Fix this GCC 3.4.6 warning, which becomes an error
if configure --enable-debug adds -Werror to CFLAGS:

      [CC]   src/document/css/apply.o
In file included from /home/Kalle/src/elinks-0.12/src/document/html/internal.h:6,
                 from /home/Kalle/src/elinks-0.12/src/document/css/apply.c:35:
/home/Kalle/src/elinks-0.12/src/document/html/parser.h:149: warning: parameter has incomplete type
In file included from /home/Kalle/src/elinks-0.12/src/document/css/apply.c:35:
/home/Kalle/src/elinks-0.12/src/document/html/internal.h:125: warning: parameter has incomplete type

Even without this warning, "enum html_special_type;"
would not be standard C89.
(cherry picked from elinks-0.12 commit c9f487cdf4)

Conflicts:
	src/document/html/parser.h: 0.13.GIT had more #includes already.
2012-11-03 22:16:23 +02:00
witekfl
88be88c819 Revert "Show the URI in the title bar even if document title is set."
This reverts commit d06cccffd6.

Some people wants URL in the title bar, but some wants the title.
I restored previous version (the title). If you want the URL, create
the patch with a configurable option.
2012-09-02 19:19:02 +02:00
witekfl
15ebc25704 Avoid compilation warning on Windows. 2012-08-08 22:28:04 +02:00
witekfl
4ec188d75e When shifting characters (for example with ALIGN_CENTER) set
colors of the empty area to the color of the first char of the centered
text. Previously it was set to the default background.
2012-07-11 11:17:24 +02:00
witekfl
aead2de59a Do not treat <li> specially and handle </li>. See test/ul_a_li.html. 2012-06-12 14:31:55 +02:00
witekfl
5f9b54f594 Apply styles of html element for body element.
See test/css/css_body.html and test/css/css_html.html
2012-05-22 15:22:48 +02:00
witekfl
36070d3277 The union of the color and the node_number in the struct screen_char.
The long term goal is good looking of the Python docs in ELinks, especially
background colors. Every start tag and every text node would have associated
a natural number. Those numbers would be "drawn" in the document instead
of colors. Finally, the screen driver would change numbers into colors.

This will be done in small steps. The next step is to implement this change
in the screen driver.
2012-03-03 11:27:58 +01:00
Miciah Dashiel Butler Masters
416d7fac7d css_apply_list_style: fix compiler warning
Add a case for CSS_LIST_ORDINAL (and assert(0)) to the switch in
css_apply_list_style.  This change should eliminate a warning from the
compiler reported by Witold that CSS_LIST_ORDINAL is not handled.
2011-11-16 16:58:08 +00:00
Miciah Dashiel Butler Masters
0189b6bfc9 Add support & test for the CSS list-style property
Recognise the list-style property and apply it by setting the
appropriate flag on the element's parattr based on the property's value.

Add test/list-style.html with an example of each possible list-style
value (many are unsupported by the HTML engine).
2011-11-14 04:34:50 +00:00
witekfl
d06cccffd6 Show the URI in the title bar even if document title is set.
ECMAcript's window.title overrides this.
2011-10-18 20:57:32 +02:00
Petr Baudis
9a001f051a Remove variables that were set but not used
Required to make new gcc with default warning settings happy.
2011-09-24 02:25:51 +02:00
Kalle Olavi Niemitalo
e22eae2e93 HTML: Rewrite parsing of meta refresh
The URL in <meta http-equiv="Refresh" content="42; URL=target.html">
can now freely contain spaces and semicolons.  There cannot be other
parameters between the delay and the URL.  If the URL is not quoted,
then it spans to the end of the attribute, except not to trailing
spaces.  If the URL is quoted, then it ends at the first closing
quotation mark.  All this is consistent with Debian Iceweasel 3.5.16.
2011-05-01 22:59:23 +03:00
Kalle Olavi Niemitalo
715571a5d6 HTML bug 1114: Don't doubly decode entities in attributes
The HTML parser decoded SGML entity references and numeric character
references in the following attributes, and then the renderer did the
same again:

link/@title
link/@hreflang
link/@type
link/@media
img/@alt
area/@alt
input[@type="image"]/@alt
input[@type="image"]/@name
input[@type="button"]/@value

The result was that e.g. title="&amp;#65;" displayed as "A"
even though it was supposed to display as "&#65;".

Fix by making the HTML parser tell the renderer that the entities have
already been decoded.
2011-05-01 22:54:45 +03:00
Witold Filipczyk
7933724dc8 Removed code using pipes for decompression and simplified decompress_data.
Workarounds for sites, which send incorrect data, probably won't work.
2010-09-24 16:12:35 +02:00
Witold Filipczyk
cbf70d5304 Refactoring: use struct string instead of unsigned char.
It probably doesn't make sense, but there is one warning less on OpenBSD.
2010-09-19 13:56:54 +02:00
Witold Filipczyk
d112adc8f3 include libgen.h for basename 2010-09-19 13:01:42 +02:00
Witold Filipczyk
236f600148 More headers.
There was a compilation error on OpenBSD, so I guess more includes are required.
2010-09-17 16:13:22 +02:00
Witold Filipczyk
79340fa4ac Better looking symbols for LI elements. 2010-08-11 21:22:21 +02:00
Nils Dagsson Moskopp
2f0d954add Rudimentary support for HTML5 media elements
Make use of the HTML5 media elements, <video> and <audio> by adding
links to the media.
2010-08-07 20:44:44 +00:00
Witold Filipczyk
2ff9f1a76f & 15 for foreground. 2010-07-31 20:58:11 +02:00
Witold Filipczyk
17f82a3e21 Decode ESC color sequences in the plain renderer.
Added functions for screen_char->color -> color_T conversion.
2010-07-31 20:51:24 +02:00
Witold Filipczyk
fecb5f1f9d Compilation fix on Mingw32. 2010-07-03 15:11:54 +02:00
Witold Filipczyk
0ec2f8eaa8 Show IP of the document in the status bar.
config options:
ui.show_ip (0/1) default 0
status.showip-text - colors
2010-03-30 14:45:19 +02:00
Kalle Olavi Niemitalo
7bb51e7139 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	NEWS
	configure.in
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/af.po (kept 0.13.GIT)
	po/be.po (kept 0.13.GIT)
	po/bg.po (kept 0.13.GIT)
	po/ca.po (kept 0.13.GIT)
	po/cs.po (kept 0.13.GIT)
	po/da.po (kept 0.13.GIT)
	po/de.po (kept 0.13.GIT)
	po/el.po (kept 0.13.GIT)
	po/es.po (kept 0.13.GIT)
	po/et.po (kept 0.13.GIT)
	po/fi.po (kept 0.13.GIT)
	po/fr.po (kept 0.13.GIT)
	po/gl.po (kept 0.13.GIT)
	po/hr.po (kept 0.13.GIT)
	po/hu.po (kept 0.13.GIT)
	po/id.po (kept 0.13.GIT)
	po/is.po (kept 0.13.GIT)
	po/it.po (kept 0.13.GIT)
	po/lt.po (kept 0.13.GIT)
	po/nb.po (kept 0.13.GIT)
	po/nl.po (kept 0.13.GIT)
	po/pl.po (kept 0.13.GIT)
	po/pt.po (kept 0.13.GIT)
	po/pt_BR.po (kept 0.13.GIT)
	po/ro.po (kept 0.13.GIT)
	po/ru.po (kept 0.13.GIT)
	po/sk.po (kept 0.13.GIT)
	po/sr.po (kept 0.13.GIT)
	po/sv.po (kept 0.13.GIT)
	po/tr.po (kept 0.13.GIT)
	po/uk.po (kept 0.13.GIT)
	src/ecmascript/ecmascript.c
2009-07-11 16:47:33 +03:00
Kalle Olavi Niemitalo
e452420d5f Debian bug 534835: Don't assert ecmascript_reset_state succeeds
After the recent ecmascript_get_interpreter change, I got an assertion
failure in render_document, which calls ecmascript_reset_state and
then asserts that it has set vs->ecmascript != NULL.
ecmascript_reset_state cannot guarantee that because there might not
even be enough free memory for mem_calloc(1, sizeof(struct
ecmascript_interpreter).  So, replace the assertion in render_document
with error handling, and likewise in call_onsubmit_and_submit.
2009-06-28 11:17:06 +03:00
Miciah Dashiel Butler Masters
874202ef7a Don't fail assertion on 0-second meta-refresh
In start_document_refresh, use register_bottom_half instead of
install_timer if the timeout is 0 because install_timer asserts that it is
given a delay greater than 0.

Add a test case, test/refresh-0timeout.html.  Note that
document.browse.minimum_refresh_time must be set to 0 to reproduce the
assertion failure.
2009-06-18 18:13:25 +00:00
Miciah Dashiel Butler Masters
aafebad3f5 Document struct search 2009-05-22 20:24:34 +00:00
Kalle Olavi Niemitalo
34f8f6a58f Merge branch 'elinks-0.12' into master
Conflicts:
	NEWS (merged)
	configure.in (merged)
	doc/man/man1/elinks.1.in (regenerated)
	doc/man/man5/elinks.conf.5 (regenerated)
	doc/man/man5/elinkskeys.5 (regenerated)
	po/af.po (used elinks-0.12)
	po/be.po (used elinks-0.12)
	po/bg.po (used elinks-0.12)
	po/ca.po (used elinks-0.12)
	po/cs.po (used elinks-0.12)
	po/da.po (used elinks-0.12)
	po/de.po (used elinks-0.12)
	po/el.po (used elinks-0.12)
	po/es.po (used elinks-0.12)
	po/et.po (used elinks-0.12)
	po/fi.po (used elinks-0.12)
	po/fr.po (used master)
	po/gl.po (used elinks-0.12)
	po/hr.po (used elinks-0.12)
	po/hu.po (used elinks-0.12)
	po/id.po (used elinks-0.12)
	po/is.po (used elinks-0.12)
	po/it.po (used elinks-0.12)
	po/lt.po (used elinks-0.12)
	po/nb.po (used elinks-0.12)
	po/nl.po (used elinks-0.12)
	po/pl.po (used master)
	po/pt.po (used elinks-0.12)
	po/pt_BR.po (used elinks-0.12)
	po/ro.po (used elinks-0.12)
	po/ru.po (used elinks-0.12)
	po/sk.po (used elinks-0.12)
	po/sr.po (used elinks-0.12)
	po/sv.po (used elinks-0.12)
	po/tr.po (used elinks-0.12)
	po/uk.po (used elinks-0.12)
2009-03-29 18:26:20 +03:00
Kalle Olavi Niemitalo
d7d18e4e43 bug 1047: inline functions C99 conformance
C99 6.7.4p3 and 6.7.4p6 set some constraints on what can be done in
inline functions and how they can be declared.  In particular, any
function declared inline must also be defined in the same translation
unit.  To comply with that, remove inline specifiers from function
declarations in header files when the functions are not also defined
in those header files.

Sun Studio 11 on Solaris 9 is stricter than C99 and does not allow
references to static identifiers in extern inline functions.  Make the
configure script detect this and define NONSTATIC_INLINE accordingly
in config.h.  Then use that in the definitions of all non-static
inline functions.

Document the restrictions and this scheme in doc/hacking.txt.
2009-03-28 20:15:08 +02:00
Kalle Olavi Niemitalo
1bb71f3732 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/config/conf.c
	src/network/ssl/ssl.c
2009-03-12 08:46:02 +02:00
Kalle Olavi Niemitalo
5a43c55c9e Rewrap lines in option documentation.
Documentation strings of most options used to contain a "\n" at the
end of each source line.  When the option manager displayed these
strings, it treated each "\n" as a hard newline.  On 80x24 terminals
however, the option description window has only 60 columes available
for the text (with the default setup.h), and the hard newlines were
further apart, so the option manager wrapped the text a second time,
resulting in rather ugly output where long lones are interleaved with
short ones.  This could also cause the text to take up too much
vertical space and not fit in the window.

Replace most of those hard newlines with spaces so that the option
manager (or perhaps BFU) will take care of the wrapping.  At the same
time, rewrap the strings in source code so that the source lines are
at most 79 columns wide.

In some options though, there is a list of possible values and their
meanings.  In those lists, if the description of one value does not
fit in one line, then continuation lines should be indented.  The
option manager and BFU are not currently able to do that.  So, keep
the hard newlines in those lists, but rewrap them to 60 columns so
that they are less likely to require further wrapping at runtime.
2009-03-08 15:18:10 +02:00
Kalle Olavi Niemitalo
ece4bfcc28 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/document/dom/renderer.c (split into rss.c, source.c)
2009-02-15 05:08:06 +02:00
Kalle Olavi Niemitalo
d14f65a331 bug 1067: Comments about freeing the DOM document node. 2009-02-15 04:27:39 +02:00
Witold Filipczyk
f77748299b bug 1067: Fix for elinks-0.13. 2009-02-12 10:05:35 +01:00
Witold Filipczyk
a7c2f14e6d bug 1067: the node was freed, but still used. 2009-02-12 09:48:04 +01:00
Kalle Olavi Niemitalo
d2854dca8d Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bookmarks/backend/default.c
	src/bookmarks/bookmarks.c
	src/session/session.c
	src/terminal/event.c
	src/viewer/text/search.c
2009-02-08 22:02:57 +02:00
Kalle Olavi Niemitalo
99d1269bc5 bug 153, 1066: Convert session-snapshot bookmarks to/from UTF-8.
These functions now expect or return strings in UTF-8:
delete_folder_by_name (sneak in a const, too), bookmark_terminal_tabs,
open_bookmark_folder, and get_auto_save_bookmark_foldername_utf8 (new
function).
2009-02-08 18:26:19 +02:00
Witold Filipczyk
d91668b0c5 Pass the codepage (cp) instead of options to the scan_http_equiv. 2009-01-27 09:23:56 +01:00
Kalle Olavi Niemitalo
687f19dbde Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/bfu/dialog.c
	src/bfu/hotkey.c
	src/bfu/inpfield.c
	src/dialogs/options.c
	src/document/renderer.c
	src/intl/gettext/libintl.h
	src/protocol/http/codes.c
	src/session/task.c
	src/terminal/event.c
	src/terminal/terminal.h
	src/viewer/text/form.c
	src/viewer/text/link.c

And a semantic conflict in src/terminal/terminal.c.
2009-01-01 19:14:01 +00:00
Kalle Olavi Niemitalo
ad45176dde Add get_terminal_codepage().
This simplifies the callers a little and may help implement
simultaneous support for different charsets on different terminals
of the same type (bug 1064).
2009-01-01 16:16:17 +00:00
Kalle Olavi Niemitalo
25da8085b3 Fix double-free crash if EOF immediately follows </MAP>.
look_for_link() used to return 0 both when it found the closing </MAP>
tag, and when it hit the end of the file.  In the first case, it also
added *menu to the memory_list; in the second case, it did not.  The
caller get_image_map() supposedly distinguished between these cases by
checking whether pos >= eof, and freed *menu separately if so.

However, if the </MAP> was at the very end of the HTML file, so that
not even a newline followed it, then look_for_link() left pos == eof
even though it had found the </MAP> and added *menu to the memory_list.
This made get_image_map() misinterpret the result and mem_free(*menu)
even though *menu had already been freed as part of the memory_list;
thus the crash.

To fix this, make look_for_link() return -1 instead of 0 if it hits
EOF without finding the </MAP>.  Then make get_image_map() check the
return value instead of comparing pos to eof.  And add a test case,
although not an automated one.

Alternatively, look_for_link() could have been changed to decrement
pos between finding the </MAP> and returning 0.  Then, the pos >= eof
comparison in get_image_map() would have been false.  That scheme
would however have been a bit more difficult to understand and
maintain, I think.

Reported by Paul B. Mahol.
(cherry picked from commit a2404407ce)
2008-12-31 20:15:44 +00:00
Miciah Dashiel Butler Masters
aedc4c3e37 CSS: do not fail assertion on "url( )"
A style-sheet containing the string "url( )" with 1 or more characters of
whitespace in between the parentheses triggered an assertion failure in
scan_css_token.

scan_css_token would find the left parenthesis, find the right parenthesis,
and then scan forwards from the left parenthesis for a non-whitespace
character to find the start of the URL and backwards from the right
parenthesis to find the end of the URL.  If there were whitespace and
nothing else, the start would be past the end, the routine would compute a
negative length for the URL, and then the routine would trigger an
assertion failure.  Now the routine simply enforces a lower bound of length
0 for the URL.
2008-12-25 07:16:02 +00:00
Kalle Olavi Niemitalo
0ec4f380fa Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	AUTHORS
2008-11-10 00:07:20 +02:00
Peter Collingbourne
658b9cc70f Fixed bug relating to newlines in hidden input fields
This patch fixes an issue whereby a newline character appearing within
a hidden input field is incorrectly reinterpreted as a space character.
The patch handles almost all cases, and includes a test case.
15/18 tests pass, but the remainder currently fail due to the fact
that ELinks does not currently support textarea scripting.
2008-11-09 23:28:46 +02:00
Kalle Olavi Niemitalo
5c2fada371 Merge branch 'elinks-0.12' into elinks-0.13
Conflicts:
	src/session/download.c
2008-11-01 22:39:17 +02:00