Inkscape is changing CDATA section to &something; notation
Bug #199656 reported by
Petr Dlouhý
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Wishlist
|
Tavmjong Bah |
Bug Description
When Inkscape is saving document, where is javascript with something between CDATA, like this:
<script type="text/
//<![CDATA[
document.
//]]>
</script>
Then Inkscape will remove CDATA section and replace it with &something; notation like this:
<svg:script
id="script2419">
//
document.
//</svg:script>
The meaning is equivalent, but this behaviour is unpleasant, because it could make the script unreadable.
Related branches
Changed in inkscape: | |
assignee: | nobody → mental |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
tags: | added: saving |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hello, sorry that I could not find your bug report and created a duplicate at https:/ /bugs.launchpad .net/bugs/ 229359
This bug makes the script unreadable and indeed prevents it from running.
Amazingly I got this answer from sas to my original report at 229359:
<<<<<
It's correct behaviour for <![CDATA[ ... ]]> in the XML editor to change to <![CDATA[ ... ]]> in the file - the XML editor shows plain text, not escaped text, and text that you type into it will be interpreted as plain text, not as escaped text.
Likewise, " changing to " is OK (though unnecessary for element content, as opposed to attribute values).
>>>>>
I am wondering what "normal behaviour" means! I claim that whichever way the script text one types or imports in Inkscape is interpreted, the sole concern should be that it works for the user when one comes out of Inkscape. This indeed is a bug.
If for any reason and for some people the text inside script tags should remain unescaped, that should be an option which can be turned on inside Preferences, escaped text being the default.