script tag should be CDATA?
Bug #168405 reported by
singlecell
This bug report is a duplicate of:
Bug #199656: Inkscape is changing CDATA section to &something; notation.
Edit
Remove
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Incomplete
|
Low
|
Unassigned |
Bug Description
Inkscape should treat script element as CDATA, as it currently treats it as
a text node and replaces " with " etc.
for example, if the following script is added to the SVG file (under the
<SVG> element):
<script type="text/
function setColour(evt)
{
var colour= evt.target.
}
</script>
when it is later saved by inkscape it becomes:
<script type="text/
function setColour(evt)
{
var colour= evt.target.
}
</script>
Inkscape also loses script attributes (at least from root svg) when saving
as Plain SVG.
To post a comment you must log in.
Originator: NO
Technically CDATA is just escaping things inside of a text node. It is
just an optional sub-part, and multiple CDATA sections could go into a
single text node, yet still be functionally equivalent as far as the
programs using it go:
<script type="text/ ecmascript" id="script2259"> getAttribute( <![CDATA[ "]]>fill< ![CDATA[ "]]>);
function setColour(evt)
{
var colour= evt.target.
}
</script>
or
<script type="text/ ecmascript" id="script2259"> getAttribute( <![CDATA[ "]]>fill" );
function setColour(evt)
{
var colour= evt.target.
}
</script>
(and splitting that last sentence to a separate bug would help)