From a4aa495c75bad7e2790899678a06fc714b086534 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Wed, 4 Sep 2013 21:29:20 -0400 Subject: [PATCH] For HTML output, create a full .html file This adds the necessary code to get the .html file to pass http://validator.w3.org/check This adds DOCTYPE/head/body/etc. Note that the validator fails if there are & in the output. CCMAIL: von.kde.org@martin-ueding.de (cherry picked from commit 0ec29537ddf6fdabb20ae37bc146cea71d079fcb) --- src/TerminalCharacterDecoder.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/TerminalCharacterDecoder.cpp b/src/TerminalCharacterDecoder.cpp index e1d49fc3..29172600 100644 --- a/src/TerminalCharacterDecoder.cpp +++ b/src/TerminalCharacterDecoder.cpp @@ -150,6 +150,16 @@ void HTMLDecoder::begin(QTextStream* output) QString text; + text.append("\n"); + text.append("\n"); + text.append("\n"); + text.append("Konsole output\n"); + text.append("\n"); + text.append("\n"); + text.append("\n"); + text.append("
\n"); + //open monospace span openSpan(text, "font-family:monospace"); @@ -163,6 +173,9 @@ void HTMLDecoder::end() QString text; closeSpan(text); + text.append("
\n"); + text.append("\n"); + text.append("\n"); *_output << text; @@ -257,7 +270,7 @@ void HTMLDecoder::decodeLine(const Character* const characters, int count, LineP } //start new line - text.append("
"); + text.append("
"); *_output << text; }