Ha right I missread, I tough he was talking about some XML sent by REST. You indeed must not mix what is part of the XML syntax of what you send to XWiki and what is some black box content from this XML point of view and should then be escaped.
On Wed, Oct 1, 2014 at 12:01 PM, Marius Dumitru Florea <[email protected]> wrote: > On Wed, Oct 1, 2014 at 12:54 PM, Thomas Mortagne > <[email protected]> wrote: >> That sounds like a bug to me. > > There's no bug here. It doesn't matter that you have the {{code}} > macro in the content of the wiki page. Anything that is inside the > content of the wiki page is XML encoded when you export (import) the > page. Just try it. > > <xwikidoc> > ... > <content> > XML-encoded content here > {{code}} > This still need to be XML encoded! Otherwise it would interfere > with the XML syntax used to describe the wiki page. > {{/code}} > ... > </content> > ... > </xwikidoc> > >> >> Would be great if you could create an issue in http://jira.xwiki.org >> with detailed step to reproduce it. >> >> On Wed, Oct 1, 2014 at 11:49 AM, rol <[email protected]> wrote: >>> I described the problem I had with using the rest interface to update files >>> in xwiki 2.1 format. >>> The point is to script a bulk upload that way. >>> >>> But as I have described, it seems that the content of the <content> element >>> must not contain xml, even if enclosed in >>> {{code}}...{{/code}}. >>> >>> It is interpreted as belonging to the surrounding xml and breaks the parsing >>> process. >>> >>> When pasting exactly the same xwiki/2.1 format direclty into the xwiki >>> editor it works as expected. >>> >>> That means that REST upload of xwiki pages only accepts that subset which >>> does not contain characters which are processed by the xml processor, >>> right? >>> >>> I would appreciate a confirmation or rebuttal of the problem, and, if so, a >>> possible workaround. >>> >>> Would a future solution to the problem be to require the content of the >>> <content> element to be within a >>> block? >>> >>> Regards, >>> >>> Roland >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://xwiki.475771.n2.nabble.com/Rest-API-XML-and-Xwiki-syntax-interference-tp7592473p7592498.html >>> Sent from the XWiki- Users mailing list archive at Nabble.com. >>> _______________________________________________ >>> users mailing list >>> [email protected] >>> http://lists.xwiki.org/mailman/listinfo/users >> >> >> >> -- >> Thomas Mortagne >> _______________________________________________ >> users mailing list >> [email protected] >> http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
