diff --git a/NEWS b/NEWS index 847b87235..27b15d026 100644 --- a/NEWS +++ b/NEWS @@ -60,6 +60,11 @@ New in spot 2.5.3.dev (not yet released) options; there are demonstrated on the new https://spot.lrde.epita.fr/ipynb/satmin.html page. + Bugs fixed: + + - print_dot() will correctly escape strings containing \n in HTML + mode. + New in spot 2.5.3 (2018-04-20) Bugs fixed: diff --git a/spot/misc/escape.cc b/spot/misc/escape.cc index 2ec8d622c..2943ee503 100644 --- a/spot/misc/escape.cc +++ b/spot/misc/escape.cc @@ -1,6 +1,6 @@ // -*- coding: utf-8 -*- -// Copyright (C) 2012, 2013, 2015, 2016 Laboratoire de Recherche et -// Developpement de l'Epita (LRDE) +// Copyright (C) 2012, 2013, 2015, 2016, 2018 Laboratoire de Recherche +// et Developpement de l'Epita (LRDE) // Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre // et Marie Curie. @@ -93,6 +93,9 @@ namespace spot case '>': os << ">"; break; + case '\n': + os << "
"; + break; default: os << i; break; diff --git a/tests/core/readsave.test b/tests/core/readsave.test index b8ccb3959..d38e553f2 100755 --- a/tests/core/readsave.test +++ b/tests/core/readsave.test @@ -1000,7 +1000,8 @@ State: 1 /* Defined before State 0 on purpose */ [1&!2] 1 /* used in spot.highlight.edges */ State: 0 {0} [t] 0 -State: 2 +State: 2 "new +line" [2] 0 [!0&1&!2] 1 [0&!2] 2 @@ -1010,7 +1011,6 @@ autfilt -dA input9 > output9 cat >expected9 < 2 0 [label="0", peripheries=2, style="bold", color="#1F78B4"] @@ -1018,13 +1018,34 @@ digraph "a U (b U c)" { 1 [label="1"] 1 -> 0 [label="c", style=bold, color="#FF4DA0"] 1 -> 1 [label="b & !c", style=bold, color="#FF7F00"] - 2 [label="2", style="bold", color="#6A3D9A"] + 2 [label="new\nline", style="bold", color="#6A3D9A"] 2 -> 0 [label="c", style=bold, color="#6A3D9A"] 2 -> 1 [label="!a & b & !c"] 2 -> 2 [label="a & !c"] } EOF diff output9 expected9 +autfilt -dbar input9 > output9a +style=', style="bold", color="#1F78B4"' +cat >expected9a <⓿)
[Büchi]> + labelloc="t" + I [label="", style=invis, width=0] + I -> 2 + 0 [label=<0
>$style] + 0 -> 0 [label=<1>, style=bold, color="#1F78B4"] + 1 [label=<1>] + 1 -> 0 [label=, style=bold, color="#FF4DA0"] + 1 -> 1 [label=, style=bold, color="#FF7F00"] + 2 [label=line>, style="bold", color="#6A3D9A"] + 2 -> 0 [label=, style=bold, color="#6A3D9A"] + 2 -> 1 [label=] + 2 -> 2 [label=] +} +EOF +diff output9a expected9a # spot.hightlight.edges and spot.hightlight.states are not valid HOA # v1 output, so they should only but output for HOA 1.1