read_http_post_inline decodes two hexadecimal digits into one byte at
a time, and it asserts that each hexadecimal digit is valid; however,
both assertions print the first digit when they fail. Fix the assertion
on the second digit to print the second digit.
Currently, the function try_form_insert_mode checks whether the current
link is a text area, insert mode is off, and the current action is enter,
and if so, it sets insert mode on. Perform this work in enter instead,
and delete try_form_insert_mode.
The old code works as follows: send_kbd_event → send_to_frame
→ frame_ev → frame_ev_kbd → try_form_insert_mode. The new code works
as follows: send_kbd_event → do_action → enter.
Currently, using smjs_load_uri on javascript: URIs cause an assertion
failure in run_connection because smjs_load_uri uses
get_protocol_handler to find the handler and asserts that the returned
handler is not NULL, but get_protocol_handler returns NULL for
javascript: URIs.
In smjs_load_uri, if the given URI has a protocol for which some
external handler is defined, immediately return JS_FALSE because
smjs_load_uri implements an asynchronous operation, and we cannot
reasonably carry out the operation and callback with an external
handler.
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).
In follow_url, do not call the follow-url hook if the URI encodes a POST
request. If scripts try to change such a URI, they can corrupt it and
cause problems later on.
This change can be reverted later when the URI structure is changed not
to store the POST data in the URI string.
Using the RFC 3546 server_name TLS extension with TLS 1.1 made
https://bugzilla.novell.com/ never respond to negotiation.
Disable TLS 1.1 with GnuTLS, like it has already been disabled with
OpenSSL. And if an SSL error is detected, disable TLS 1.2 as well.
I was trying to check which charset WIDGET_TEXT uses in the buffer but
had difficulty finding the code that handles key presses and updates
the buffer. These comments should make that easier in the future.
In bookmark_folder_get_property, convert the jsid value into
a jsval value before passing it to jsval_to_bookmark_string.
This commit fixes a bug in the xulrunner-2.0 compatibility changes
of commit 2844f8b715, which rendered
the bookmarks scripting interface for SpiderMonkey nonfunctional.
src/network/ssl/ssl.c defined some constant arrays for passing to
GnuTLS functions. Those functions have been deprecated and their
calls are in #if 0 nowadays. Put #if 0 around the arrays as well.
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.
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="&#65;" displayed as "A"
even though it was supposed to display as "A".
Fix by making the HTML parser tell the renderer that the entities have
already been decoded.
Don't search for SpiderMonkey in hardcoded directories
(/usr /usr/local /opt/spidermonkey /opt/js), and don't support
--with-spidermonkey=DIR (which I think was documented in elinks-users
only). Instead, ask pkg-config for mozjs185 or mozilla-js.
Everyone who installed SpiderMonkey in an unusual place must set
PKG_CONFIG_PATH appropriately.
This commit also includes a few minor changes in the SpiderMonkey
section of the configure script:
* Update the SpiderMonkey version number in "checking" messages
from 1.5 RC3a to 1.8.5, which matches the actual checks.
* Wrap the option documentation with AS_HELP_STRING.
* Use the Autoconf-generated $with_spidermonkey variable directly,
instead of copying $withval.
* Quote the arguments of macros more consistently.
* Warn if SpiderMonkey was requested but not found.
Fix a minor bug introduced in commit
de45a1df516deee13fe002a0f71678a2ce46cd73 on 2005-07-21.
Before that, EL_CHECK_OPTIONAL_LIBRARY used to do this:
if test -n "$withval" && test "x$withval" != xno; then
AC_MSG_ERROR([$2 not found])
fi
It was then changed to look in "[$]WITHVAL_$1" rather than "$withval",
but the initial "x" was lost in that change. Restore it.
The deprecated gnutls_certificate_verify_peers function returns -1
if it fails, or a set of gnutls_certificate_status_t bits; each bit
indicates some kind of problem, so the result is zero if the
certificate is OK.
The newer gnutls_certificate_verify_peers2 function returns -1 if it
fails, or 0 if it succeeds; and writes the status bits via a pointer.
When using that function, ELinks must check the status separately.
Do that.
Also, if GnuTLS is not being used, do not declare a status variable,
because leaving it unused would break the debug build:
/home/Kalle/src/elinks-0.13/src/network/ssl/socket.c: In function ‘ssl_want_read’:
/home/Kalle/src/elinks-0.13/src/network/ssl/socket.c:87: error: unused variable ‘status’
/home/Kalle/src/elinks-0.13/src/network/ssl/socket.c: In function ‘ssl_connect’:
/home/Kalle/src/elinks-0.13/src/network/ssl/socket.c:121: error: unused variable ‘status’
Make u2cp_() map code points U+0080 to U+009F via strange_chars[] even
if the target codepage is UTF-8. This helps with buggy web pages that
use ’ when they mean ’. This change does not affect how
ELinks decodes raw bytes 0x80 to 0x9F in HTML.
u2cp_() is used only via the u2cp and u2cp_no_nbsp macros.
Possible side effects of this change at each use of these macros:
* get_translation_table(): Not affected because it does not call u2cp
if the target codepage is UTF-8.
* get_entity_string(): Numeric character references are affected, as intended.
Character entity references are not affected because entities[]
does not define any entities in the U+0080...U+009F range.
* kbd_field(), term_send_ucs(), field_op(): Affected. It is no longer
possible to enter code points U+0080...U+009F from the terminal.
This should not be a problem in practice because those would be
control characters anyway and should therefore be filtered by the
slave process (which doesn't yet recognize them; bug 777).
If ELinks was configured --without-x, the build failed at
xprop_to_string:
.../src/osdep/osdep.c:500: error: expected ‘)’ before ‘*’ token
Fix by moving xprop_to_string into the #ifdef HAVE_X11 section.
Reported by Thomas Adam.
If Xutf8TextPropertyToTextList or XmbTextPropertyToTextList returns a
positive number, that means some characters were unconvertible and
have been replaced with XDefaultString(). Use the resulting string
even in that case, as if the function had returned Success.
The previous version ignored the string and didn't even free it.
gnome-terminal 2.30.2 expects UTF-8 in the "OSC Ps ; Pt BEL" sequence
that sets the window title. However, XGetWMName typically returns the
title in "STRING" (Latin-1) or "COMPOUND_TEXT" (escape sequences)
encoding. Recode the title to restore it correctly. This helps
especially in the fi_FI.UTF-8 locale, where gnome-terminal has "Pääte"
as the default title.
Related to bugs 885 and 336.