pencil icon indicating copy to clipboard operation
pencil copied to clipboard

Cannot use & in window frame title (sketchy GUI)

Open prikhi opened this issue 9 years ago • 3 comments

From cortex.sk on September 03, 2013 03:45:41

Package version 2.0.3 from official site. Distribution: Kubuntu 13.04

If I want to use "&" in window frame title (from sketchy gui) for example "Calendars & Contacts", the title will remain unchanged. On double clicking i see the text.

demonstration: http://youtu.be/WJTExEzhjIM

Original issue: http://code.google.com/p/evoluspencil/issues/detail?id=582

prikhi avatar Mar 13 '15 20:03 prikhi

This solves the problem:

diff --git a/app/content/pencil/stencil/SketchyGUI/Definition.xml b/app/content/pencil/stencil/SketchyGUI/Definition.xml
index 873fa89..b2749bc 100644
--- a/app/content/pencil/stencil/SketchyGUI/Definition.xml
+++ b/app/content/pencil/stencil/SketchyGUI/Definition.xml
@@ -1551,9 +1551,7 @@ MenuItem]]></Property>
             <path  id="body" style="fill:white;stroke:black"/>
             <path  id="menu" style="fill:white;stroke:black"/>
             <path  id="button" style="fill:white;stroke:black"/>
-            <foreignObject x="0" y="0" width="200" height="100" id="text">
-                <div xmlns="http://www.w3.org/1999/xhtml"></div>
-            </foreignObject>
+            <text id="text"/>
         </p:Content>
     </Shape>

... but is this a good solution? I think it is an improvement NOT to use the ForeignObject construction in the SVG result, since these ForeignObject things are only supported by Firefox, and not by any other SVG tool.

To be tested: does this change break backward compatibility when saving? Any other problems?

mvdw avatar Aug 16 '15 18:08 mvdw

I tested the compatibility: no problem. Rests the question: Is this a good solution?

mvdw avatar Aug 17 '15 19:08 mvdw

I've noticed this in multiple elements.

I will checkout ForeignObject vs text. I think the other solution is to escape the text, writing &amp; produces an ampersand.

prikhi avatar Dec 11 '15 03:12 prikhi