Mercurial > octave
changeset 25251:0bc58956aa40 stable
Escape '<', '>' in NEWS file before it is displayed as HTML in Release Notes window (bug #53642).
* main-window.cc (display_release_notes): Replace '<' with "<" and '>' with
">" in NEWS file before it is displayed as HTML.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 14 Apr 2018 22:33:01 -0700 |
parents | 75ee2de069ee |
children | 75eea4768e24 |
files | libgui/src/main-window.cc |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/main-window.cc Sun Apr 15 07:08:41 2018 +0200 +++ b/libgui/src/main-window.cc Sat Apr 14 22:33:01 2018 -0700 @@ -459,6 +459,10 @@ news = stream->readAll (); if (! news.isEmpty ()) { + // Convert '<', '>' which would be interpreted as HTML + news.replace ("<", "<"); + news.replace (">", ">"); + // Add HTML tags for pre-formatted text news.prepend ("<pre>"); news.append ("</pre>"); }