Once to utf-8 before pre_format_html_hook, and second time to the original encoding after python
script execution. I know it is inefficient, but computers are quite fast nowadays.
Fixes the errors
x86_64-pc-linux-gnu-ld: hooks.o:(.bss+0x0): multiple definition of `erb_module'; core.o:(.bss+0x0): first defined here
x86_64-pc-linux-gnu-ld: ruby.o:(.bss+0x0): multiple definition of `erb_module'; core.o:(.bss+0x0): first defined here
Bug: https://bugs.gentoo.org/730658
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.
ui.clipboard_file is filename of the clipboard file. This file can be a named pipe.
See contrib/clipboard/clip.sh how to set up copying to clipboard using socat and xclip.
Just run clip.sh (it will be running in a loop) before starting elinks and
set ui.clipboard_file = "~/.elinks/clipboard.fifo".
Default value of this bool option is 0. Nothing changes in behaviour since 0.13.1.
If you set it to 1, one more process will be started. This main process will handle
only interlink connections, while other processes will be slaves to it.
This will allow to exit first started elinks session without breaking others.
Before when master terminal quit session, all slave terminal stopped to work.
There is a workaround. ELinks on master terminal forks on start and becomes slave.
The code in cookies.c would arrange that c->path would always contain
a string ending in "/". This may have been an attempt to make it
easier to do a proper subpath check in is_path_prefix.
Howver, the overall result is wrong in the case
Set-Cookie: ....;path=/some/thing
and then later
http://site.example.com/some/thing
c->path gets set to "/some/thing/" which doesn't pass the test in
is_path_prefix.
The precise required algorithm is described in RFC6265 5.1.4. The
existing code fails to implement the first of the three bulleted
conditions at the end of 5.1.4.
The trailing "/" is actually not so helpful for this. It is more
convenient to change is_path_prefix to do subpath matching directly:
we change it to insist that the supposed path prefix is a textual
prefix of the request path, *and* that this happens at a path segment
boundary: ie at '/' or end of string.[1]
Accordingly, we no longer add "/" to the cookie path. When we strip
the final path element we strip the "/" too. We still insert a "/" if
the path was empty.
[1] It is not 100% clear to me what "path" (URI_PATH) is but I think
it does not include any query parameters. If I am wrong about that
then '?' should be tolerated too.
CC: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>