Lister: HTML some codes viewing problem

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
leopoldus
Senior Member
Senior Member
Posts: 221
Joined: 2004-11-21, 09:47 UTC

Lister: HTML some codes viewing problem

Post by *leopoldus »

If there is the following code in a HTML document, Lister is not able to handle it or even to hide it, but the whole text between the tags is shown in Lister HTML view mode.
Is there some option put Listert either to handl this tag correctly or at least to prevent this tag from showing.

Code: Select all

<STYLE>
@page Section1 {size: 595.3pt 841.9pt; margin: 70.85pt 68.05pt 70.85pt 68.05pt; }
...................
...................
page: Section1
}
</STYLE>
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

@page

Post by *Clo »

2leopoldus
:) Hello !
- I guess that the @page CSS-attribute makes that TC doesn't hide the whole <STYLE>…</STYLE> marker and its content.

- According with the MS' specifications, there are only
@font-face -to get a *.eot remote font- and @import, to get a remote style-sheet.
- The HTML view in Lister is only a plain text with active links. It doesn't handle or apply the <STYLE> instructions in anyway. But an unknown attribute makes certainly that the marker is no longer recognized, then not hidden…
- I have a lot of HTML pages with <STYLE> and without any @…, all are displayed properly.

:mrgreen: Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
leopoldus
Senior Member
Senior Member
Posts: 221
Joined: 2004-11-21, 09:47 UTC

Re: @page

Post by *leopoldus »

2Clo
Clo wrote:- According with the MS' specifications, there are only
@font-face -to get a *.eot remote font- and @import, to get a remote style-sheet..... I have a lot of HTML pages with <STYLE> and without any @…, all are displayed properly.
I have not too met such files before. Indeed I know the only site in Internet using such tags (markers) in their HTML-documents, but to my big regret, this is a public resource whose documents I have to download and to reuse many times a day, so it's a real headache for me. :cry:

However we must admite, that (unlike Lister) such bowsers as Internet Explorer, Opera and even some small freeware HTML browsers have no any problems with those pages, so this is not simply a home invention of this public resource publishers, but some conventional, although rarely used HTML tags.
Clo wrote:- I guess that the @page CSS-attribute makes that TC doesn't hide the whole <STYLE>…</STYLE> marker and its content.
Not, it does not show the tags (markers) <style> and </style>themself, but olnly this text inside: from the word @page till the symbol }. I can paste here the whole text fragment copyied from the source document opened in Notepad:

Code: Select all

<STYLE>@page Section1 {size: 21.0cm 842.0pt; margin: 70.85pt 65.2pt 70.85pt 65.2pt; }
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
P.MsoPlainText {
	FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"
}
LI.MsoPlainText {
	FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"
}
DIV.MsoPlainText {
	FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"
}
DIV.Section1 {
	page: Section1
}
</STYLE>
Last edited by leopoldus on 2004-11-27, 11:41 UTC, edited 2 times in total.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Send a sample plz.

Post by *Clo »

2leopoldus
- Like I told you above, I never had any trouble with the <STYLE> marker in my HTML-pages…
- I advise you to send such a page causing a wrong display to the Author, as a ZIP attachment :
support ATghislerDOTcom, with a short note quoting that thread (its URL)…

:mrgreen: K R
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Lister just hides unknown/unused tags, but not the text between them. So for example <b> (for bold text) is hidden, but the actual bold text is NOT hidden.

Btw, the proper way to do this is to put the style definition into comments, like it is done for example in the phpbb sources:

<style type="text/css">
<!--
your style definition goes here
-->
</style>

The same should be done for <script> or other tags which contain text which shouldn't be shown.
Author of Total Commander
https://www.ghisler.com
User avatar
leopoldus
Senior Member
Senior Member
Posts: 221
Joined: 2004-11-21, 09:47 UTC

Post by *leopoldus »

2ghisler(Author)
Sorry, I am not HTML language specialist, but I usually try to use ordinary logic instead of knowledge, sometimes it works.
I'd tell once more: all HTML browsers/viewers from MSIE and Opera till any small freeware home-made app are able to handle such code fragments correctly. Even if some app can not correctly understand instructions the text between tags <style> and </style> contains, a browser understand, that any text between tags <style> and </style> is some service information wich is not intended to be shown for an user. Why Lister can not learn it?
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

Well, content between which tags would you show and between which you wouldn't show?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Style as comment always

Post by *Clo »

:) Hello !
- Ch. Ghisler is right, the <STYLE> marker must be written within a comment-marker; I didn't noticed that in first, since my editor writes alright the <STYLE> like this.

- You might pay attention to this writting-mode in your pages…
- The best solution is to use an external style-sheet, with a <LINK> marker like, i.e. :

Code: Select all

<LINK REL=STYLESHEET HREF="model.css" TYPE="text/css">
:mrgreen: Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
leopoldus
Senior Member
Senior Member
Posts: 221
Joined: 2004-11-21, 09:47 UTC

Post by *leopoldus »

2Clo
I'm sorry for my sylliness, but have to tell once more: those are not HTML pages of mine, but of a big public information resource I have to work with much enough. It does not depend of me, how those pages are written, and I can only read on not read them, and if I choose to read, the next choice is which tool I use to read them. I'd whish to use TC's Lister for this purpose, and it fits, but only one problem I write about.

There is another question here. Experts as Ch. Ghisler, Clo and Roman tell me, that HTML code at those pages I use is wrong (miss <-brackets), that's the reason, why Lister does not correctly handle them. I am not a big HTML-language expert, so I must trust and agree, that the publisher produces wrong HTML-documents, which have to cause and really cause mishandling of any browser. Conclusion: Lister is OK, the publisher of those pages is wrong.
Well, but on the opposite site, all HTML browsers/viewers from MSIE and Opera till any small freeware home-made app are able to handle such code fragments correctly. Conclusion - ???
woefdram
Junior Member
Junior Member
Posts: 82
Joined: 2004-05-16, 11:14 UTC

Post by *woefdram »

Why not use the Lister plugin Webview? (http://www.totalcmd.net/plugring/webview.html
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

leopoldus,
Conclusion - ???
The browsers very probably ignore text between unknown tags. The Lister does not, it only ignores the tags. You can see this as a feature or as a bug, one might like it another might not.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
leopoldus
Senior Member
Senior Member
Posts: 221
Joined: 2004-11-21, 09:47 UTC

Post by *leopoldus »

2Hacker
The browsers very probably ignore text between unknown tags. The Lister does not, it only ignores the tags.
Well, it makes sence, now I do understand the logic. I think you are right. Thanks.
But wouldn't it be more user-friendly to give an option to choose in Lister's configurating menu, if the user wish to view the text between unknown tags or not?
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

wouldn't it be more user-friendly to give an option to choose in Lister's configurating menu, if the user wish to view the text between unknown tags or not?
It probably would.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply