Bug 324476 - HTML export has too many closing span tags in it
Summary: HTML export has too many closing span tags in it
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Unclassified
Component: history (show other bugs)
Version: 2.10.5
Platform: Kubuntu Packages Linux
: NOR minor (vote)
Target Milestone: ---
Assignee: Konsole Developer
URL: http://chaos.stw-bonn.de/users/mu/upl...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-03 21:23 UTC by Martin Ueding
Modified: 2013-09-07 13:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.12


Attachments
Patch to fix this (1.71 KB, patch)
2013-09-03 22:00 UTC, Martin Ueding
Details
Patch (1.74 KB, patch)
2013-09-03 22:03 UTC, Martin Ueding
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Ueding 2013-09-03 21:23:55 UTC
I exported a session to a HTML document. The <span> tag that creates the monospace font is closed after the first line of output. The remainder of the session is shown in the default font of the browser.

Reproducible: Always

Steps to Reproduce:
1. Issue multiple commands
2. Export as HTML
3. View the source of the exported HTML
Actual Results:  
Only the first lines were in monospace font. The remainder was in default font.

Expected Results:  
I would expect the whole document to be in monospace font. I would even expect the exported HTML to be valid.
Comment 1 Martin Ueding 2013-09-03 21:27:17 UTC
I looked into the source code of Konsole and located the code responsible for it. If I am not mistaken, it is in “src/TerminalCharacterDecoder.cpp” where a function “closeSpan(text)” is called. 

I am not sure why it does not work yet, and I have yet to set up the build to actually compile it. But I would like to look at it during the next 10 days or so, and try to submit a patch.
Comment 2 Martin Ueding 2013-09-03 22:00:12 UTC
Created attachment 82140 [details]
Patch to fix this

I think I got it right now. After trying to export a session with multiple lines, the output was correct. I would be happy if one of the main developers could look over this and merge it.
Comment 3 Martin Ueding 2013-09-03 22:03:51 UTC
Created attachment 82141 [details]
Patch

Sorry, I did not look at the tabs/spaces. My patch has spaces now.
Comment 4 Kurt Hindenburg 2013-09-04 02:48:19 UTC
THanks for looking at this  - if you want you can put this up on the KDE patch review site - https://git.reviewboard.kde.org with group Konsole.  If not that's OK, I'll look at it either way.
Comment 5 Martin Ueding 2013-09-04 10:39:40 UTC
I put it on the review board: https://git.reviewboard.kde.org/r/112507/
Comment 6 Kurt Hindenburg 2013-09-05 01:18:17 UTC
Git commit 9f73fbb57f0f2b2ec5c7301b9fc632cde6bd187d by Kurt Hindenburg.
Committed on 05/09/2013 at 01:15.
Pushed by hindenburg into branch 'master'.

Correct <span></span> in HTML output

Fix issue where HTML export has too many closing span tags in it.

Thanks to Martin Ueding von.kde.org@martin-ueding.de for patch.

REVIEW: 112507
FIXED-IN: 4.12

M  +6    -2    src/TerminalCharacterDecoder.cpp

http://commits.kde.org/konsole/9f73fbb57f0f2b2ec5c7301b9fc632cde6bd187d
Comment 7 Kurt Hindenburg 2013-09-06 12:33:27 UTC
Git commit 6b4c8925e1cc7bc599deb82d7b11016c582d4761 by Kurt Hindenburg.
Committed on 05/09/2013 at 01:15.
Pushed by hindenburg into branch 'KDE/4.11'.

Correct <span></span> in HTML output

Fix issue where HTML export has too many closing span tags in it.

Thanks to Martin Ueding von.kde.org@martin-ueding.de for patch.

REVIEW: 112507
FIXED-IN: 4.12
(cherry picked from commit 9f73fbb57f0f2b2ec5c7301b9fc632cde6bd187d)

M  +6    -2    src/TerminalCharacterDecoder.cpp

http://commits.kde.org/konsole/6b4c8925e1cc7bc599deb82d7b11016c582d4761
Comment 8 Kurt Hindenburg 2013-09-07 13:03:24 UTC
Git commit b94acfce5051cda379b39b5a03bec507cf8822cf by Kurt Hindenburg.
Committed on 05/09/2013 at 01:15.
Pushed by hindenburg into branch 'frameworks'.

Correct <span></span> in HTML output

Fix issue where HTML export has too many closing span tags in it.

Thanks to Martin Ueding von.kde.org@martin-ueding.de for patch.

REVIEW: 112507
FIXED-IN: 4.12
(cherry picked from commit 9f73fbb57f0f2b2ec5c7301b9fc632cde6bd187d)

M  +6    -2    src/TerminalCharacterDecoder.cpp

http://commits.kde.org/konsole/b94acfce5051cda379b39b5a03bec507cf8822cf