octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45396] NEWS displayed in Qt GUI omits items w


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #45396] NEWS displayed in Qt GUI omits items which look like HTML
Date: Wed, 24 Jun 2015 21:48:06 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 SeaMonkey/2.15

Follow-up Comment #15, bug #45396 (project octave):

Sort of makes sense (i.e., why add html tags to the NEWS file contents just to
convert them back to text), but there are some problems here:

1) QTextEdit is actually an HTML editor as well:

"QTextEdit is an advanced WYSIWYG viewer/editor supporting rich text
formatting using HTML-style tags. It is optimized to handle large documents
and to respond quickly to user input."

It recognizes the <pre></pre> tags, and when I remove those flags the contents
of the release-notes window is missing all CRs.  It's just a single line of
text.  There is a solution to this, which is to use the member function
setPlainText() instead of setText().  That works, but then the font is not
monospaced and the contents doesn't look good.  So, as strange as it seems,
adding the HTML tags for &, >, <, <pre> and </pre> produces the nicer result
in QTextBrowser/QTextEdit.  I could take it further and try selecting a font
that has fixedPitch with plain text, but I'd rather not mess around with fonts
for this.

2) CDATA code may have the same issue as the &/</>.  I tried your suggestion
of <pre><![CDATA[…the original NEWS goes here…]]></pre>.  Both the
QTextBrowser and SeaMonkey web browser do not display what is between
<![CDATA[...]].  (If I move the ]] ahead some, whatever after it appears in
the viewer.)  Also, for QTextBrowser the presents of [] in the release notes
text caused leaves verbatim mode.  (See attached screen capture.)  I think
we'd end up having to translate some characters in that case as well.

I think translating the & < and > characters are the easiest route to go given
where things stand right now.

If anyone knows where the NEWS-4.0.html is constructed, that would help. 
(BTW, SeaMonkey converts < to < etc. when it saves the release notes HTML page
to file.)

(file #34314)
    _______________________________________________________

Additional Item Attachment:

File name: Screenshot-Octave Release Notes.png Size:19 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45396>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]