summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAur??lio A. Heckert <aurium@gmail.com>2009-03-30 17:46:33 +0000
committeraurium <aurium@users.sourceforge.net>2009-03-30 17:46:33 +0000
commitd254d1a7668f2218230c1417a9d8d80a0111e19c (patch)
tree49eccff02029c6651d0840b2b26ebf7dd37840f3
parentFix icon cache code to properly render multiple sizes as needed. (diff)
downloadinkscape-d254d1a7668f2218230c1417a9d8d80a0111e19c.tar.gz
inkscape-d254d1a7668f2218230c1417a9d8d80a0111e19c.zip
etree CDATA support compatibilization in inkwebeffect.py
(bzr r7592)
-rw-r--r--share/extensions/Makefile.am8
-rw-r--r--share/extensions/inkwebeffect.py13
2 files changed, 13 insertions, 8 deletions
diff --git a/share/extensions/Makefile.am b/share/extensions/Makefile.am
index 70b06c213..7fac49c5c 100644
--- a/share/extensions/Makefile.am
+++ b/share/extensions/Makefile.am
@@ -67,6 +67,8 @@ extensions = \
ill2svg.pl \
inkex.py \
Inkscape.pm \
+ inkwebeffect.py \
+ inkweb.js \
interp.py \
interp-att-g.py \
launch_webbrowser.py \
@@ -191,7 +193,7 @@ modules = \
inkscape_help_svgspec.inx \
inkscape_help_keys.inx \
interp.inx \
- interp-att-g.py \
+ interp-att-g.inx \
lindenmayer.inx \
lorem_ipsum.inx \
markers_strokepaint.inx \
@@ -231,8 +233,8 @@ modules = \
text_braille.inx \
triangle.inx \
txt2svg.inx \
- web-set-att.py \
- web-transmit-att.py \
+ web-set-att.inx \
+ web-transmit-att.inx \
whirl.inx \
wmf_input.inx \
xaml2svg.inx
diff --git a/share/extensions/inkwebeffect.py b/share/extensions/inkwebeffect.py
index 5fbb8db8b..994f74dea 100644
--- a/share/extensions/inkwebeffect.py
+++ b/share/extensions/inkwebeffect.py
@@ -25,7 +25,6 @@ class InkWebEffect(inkex.Effect):
self.reUpdateJS = '/\\*\\s* inkweb.js [^*]* InkWebEffect:AutoUpdate \\s*\\*/'
def mustAddInkWebJSCode(self, scriptEl):
- #inkex.errormsg( re.search(self.reUpdateJS, scriptEl.text) )
if not scriptEl.text: return True
if len(scriptEl.text) == 0: return True
if re.search(self.reUpdateJS, scriptEl.text): return True
@@ -33,10 +32,14 @@ class InkWebEffect(inkex.Effect):
def addInkWebJSCode(self, scriptEl):
js = open( os.path.join(sys.path[0], "inkweb.js"), 'r' )
- scriptEl.text = \
- inkex.etree.CDATA(
- "\n/* inkweb.js - InkWebEffect:AutoUpdate */\n" + js.read()
- )
+ if hasattr(inkex.etree, "CDATA"):
+ scriptEl.text = \
+ inkex.etree.CDATA(
+ "\n/* inkweb.js - InkWebEffect:AutoUpdate */\n" + js.read()
+ )
+ else:
+ scriptEl.text = \
+ "\n/* inkweb.js - InkWebEffect:AutoUpdate */\n" + js.read()
js.close()
def ensureInkWebSupport(self):