Mudlet/Mudlet — pull request #208 by SlySven (2014-10-10 04:10:47+00:00)
Title: Fix: Revise HTML producing code to produce VALID html

HTLM Issues addressed:
* a stray, unopened \ was being placed at start of body of HTML.
* use of XHTML \
instead of correct HTML \ to force new lines
in produced HTML text.
* empty lines were not being reproduced when copying from clipboard to
HTML.
* previously produced HTML was being place all on one line, no line-feeds
in HTML source - by changing the CSS "white-space" arguments they are now
put into the produced HTML making it possible to edit it in a normal text
editor but it should still render correctly.
* the data "type='text/css'" was missing from HTML \\ tag-pair was missing from the \ part of HTML
documents produced - The \ element is mandatory for HTML 4.01
strict. It is now created with data about the source of the HTML.
* the charset \ information was not as far as possible towards the
start of the HTML \ as it could have been - it is best practice to
do this as a parser must restart parsing a document when it encounters
this type of information that changes the encoding away from the default
ISO-8859 form.
* the list of mono-spaced fonts in the header CSS data did not include, as
the first entry, the font that was actually used for the source of the
HTML data.
* no default font size or line spacing was set which makes different
browsers behave differently, especially if zooming is used, the
parameters used now should produce HTML that is as similar as possible
when showing the same output on most modern GUI-type browsers.
* there was no indication as to Mudlet, being the source of the HTML, as
the generator of the HTML - this now happens and includes the application
version data.
* the "copy To HTML on the clipboard" code ( in
TTextEdit::copySelectionToClipboardHTML() ) did not append the \ &
\ tags to close the end of the document produced.
* the selection of only part of the first line of text onto the clip-board
did not previously take account of the offset necessary for that line
to line up with the following lines.
* the use of \\ tags requires them to be used inside another
block element inside the \\ part of the HTML document but
this was not being done. A \\ pair now meets that requirement.

Also:

When logging console output to a file the filename was being saved in a
local variable in TConsole::slot_toggleLogging() and not the class member
with the SAME name "mLogFileName" that was defined for the purpose.

The date-time format used for log file names has been changed
from: dd-MM-yyyy#hh-mm-ss
to: yyyy-MM-dd#hh-mm-ss
so that an alphabetic sort of file-names will agree with a sort on the
file creation/last modified metadata. This should make it easier to pick
out a wanted log file from a directory listing.

The tool-tip for the "record to log file" TConsole control button is now
dynamically modified to reflect the current recording/not recording state.

With these changes the HTML that is produced should pass validation by
the W3C on-line or other HTML validators.

Note: to concatenate multiple log files they may be joined by cutting and
pasting at the \ and \ boundaries - possibly with an \ to
delimit the join so that they are arranged:
\\\\\
\...\\
\...\\
... \
\...\\\

Signed-off-by: Stephen Lyons \