Lister: F2 breaks Strip tags+UTF-8 view on some HTMs

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Lister: F2 breaks Strip tags+UTF-8 view on some HTMs

Post by *DrShark »

F2 key in Lister refreshes content of the file, but doesn't change current view.
However, on some HTM files when "HTML text (strip tags)" together with "UTF-8" view used, F2 makes Lister to show file in just UTF-8 view.

To reproduce:
1. Download file http://rghost.ru/7qs27Nyq6, password:utf8htm2 (also used for another bugreport). Problem HTM file inside ZIP archive.
2. If you don't have Lister plugins for HTM files, open htm file from archive with F3 key, or use Alt+Shift+F3 if you have.
3. Press "7" key on keyboard: it will switch Lister into "HTML text (strip tags)"+"UTF-8" view.
4. Press "F2" key on keyboard: Lister will show file in just "UTF-8" view, although in "Options" menu you will see both "HTML text (strip tags)" and "UTF-8" menu items checked.
Last edited by DrShark on 2015-11-26, 10:41 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The download is password protected.

I guess that it depends on the "Content-Type" header of the file.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Sorry for the password, I put by mistake. The password is:
utf8htm2
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I got it now! The problem with the file is that the UTF-8 header is incomplete, so TC ignores it.
It is:
<META charset="utf-8">

The correct header would be:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

Original issues with this file disappeared in TC 9.00a:
1) now the sample file opens in correct "HTML text (strip tags)"+"UTF8" view by default;
2) F2 now doesn't change the view to another in "HTML text (strip tags)"+"UTF8", as well as "UTF8" view.

However, few other issues appeared, including one related to F2 changing the view. I'll post them in TC 9 forum.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply