#1100487 w3m: bad display with image and U+2060 WORD JOINER

Package:
w3m
Source:
w3m
Description:
WWW browsable pager with excellent tables/frames support
Submitter:
Vincent Lefevre
Date:
2025-03-14 12:51:02 UTC
Severity:
normal
#1100487#5
Date:
2025-03-14 12:22:53 UTC
From:
To:
There is a display issue when one has an image (valid or not) and
text with the U+2060 WORD JOINER character.

I've attached a testcase, which contains something like:

<p>Text.</p>
[...]
<p>Text.</p>
<p><img src="data:image/png;base64," alt=""/></p>
<p>foo⁠bar abcdef.</p>

Search for "ab", then move the cursor to the right up to the end.
One successively gets:

foo⁠bar aacdef.
foo⁠bar aabdef.
foo⁠bar aabcef.
foo⁠bar aabcdf.
foo⁠bar aabcde.
foo⁠bar aabcdef
foo⁠bar aabcdef.

Alternatively, put the cursor at the end ([End] key), then at the
beginning of the "foo⁠bar abcdef." line, then move the cursor to
the right: same display issue starting with "bar".

It is important that the test part is not displayed on the first page,
hence the sequence of paragraphs. Note that this issue disappears if
either the image or the U+2060 WORD JOINER character is removed.

I first noticed this issue on

https://bugzilla.mozilla.org/show_bug.cgi?id=1876874

when I was searching for "C\+\+" (specifically "of C\+\+").