changeset 420:792b9ee3d139

action.SvgEditor: enclosed svgdata by <script></script>
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 13 Sep 2009 10:18:58 +0200
parents ca495f80cc5c
children 63e921094f6d
files data/plugin/action/SvgEditor.py htdocs/svg-edit/editor/svg-editor.js
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/SvgEditor.py	Sat Sep 12 17:46:02 2009 +0200
+++ b/data/plugin/action/SvgEditor.py	Sun Sep 13 10:18:58 2009 +0200
@@ -112,7 +112,7 @@
         if filecontent:
              # svg data is saved as xml. at least firefox changes the data by adding closing tags e.g. </rect></circle></circle></circle></rect></svg>
              # this renders then only the first element
-             filecontent = "<!-- %s -->" % filecontent
+             filecontent = "<script>%s</script>" % filecontent
         meta = """<http-equiv="Content-type" content="text/html;charset=UTF-8">
 <link rel="icon" type="image/png" href="%(htdocs)s/images/logo.png">
 <link rel="stylesheet" href="%(htdocs)s/jgraduate/css/jPicker-1.0.9.css" type="text/css"></link>
--- a/htdocs/svg-edit/editor/svg-editor.js	Sat Sep 12 17:46:02 2009 +0200
+++ b/htdocs/svg-edit/editor/svg-editor.js	Sun Sep 13 10:18:58 2009 +0200
@@ -15,7 +15,7 @@
 	var svgCanvas = new SvgCanvas(document.getElementById("svgcanvas"));
 	// because moin uses currently HTML 4.0.1 we send the data as a comment in the HTML code
 	var svgdata = document.getElementById("svgdata").innerHTML;
-	var filecontent = svgdata.slice(5, svgdata.length - 4);
+	var filecontent = svgdata.slice(8, svgdata.length - 9);
 	if (filecontent != '') {
 	    if (!svgCanvas.setSvgString(filecontent)) {
 	        if(!confirm('There were parsing errors in your SVG source.\nRevert back to original SVG source?') ) {