commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ingmar Kliche (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SCXML-76) Serialization of expressions may produce invalid XML
Date Sun, 27 Jul 2008 19:54:35 GMT

    [ https://issues.apache.org/jira/browse/SCXML-76?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617331#action_12617331
] 

Ingmar Kliche commented on SCXML-76:
------------------------------------

Rahul,

I tried to find a compact solution and added patches for 3 files.

- Ingmar.

2008/7/17 Rahul Akolkar (JIRA) <jira@apache.org>



> Serialization of expressions may produce invalid XML
> ----------------------------------------------------
>
>                 Key: SCXML-76
>                 URL: https://issues.apache.org/jira/browse/SCXML-76
>             Project: Commons SCXML
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Ingmar Kliche
>             Fix For: 0.9
>
>         Attachments: SCXMLHelper.patch, SCXMLSerializer.patch, SCXMLSerializerTest.patch
>
>
> The SCXMLSerializer does not escape expression strings. With an EcmaScript evaluator
the following may occur:
> original document:
> <transition event="foo" cond="i &lt; 3" target="bar">
> the serialized document will be:
> <transition event="foo" cond="i < 3" target="bar">
> which is ill-formed XML. The serializer would need to escape the condition string. This
applies to all places where expressions may occur.
> Apache commons-lang has a StringEscapeUtil.escapeXML(String data) function which would
solve the problem (I don't know if it would help for all cases). 
> http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringEscapeUtils.java?view=markup
> But using this would add another dependency to commons-scxml.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message