[
https://issues.apache.org/jira/browse/SLING-11785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17693967#comment-17693967
]
Stefan Seifert commented on SLING-11785:
----------------------------------------
[~kwin] thanks! - but does not work for me yet.
steps to reproduce:
# using SNAPSHOT from cpconverter branch
https://github.com/apache/sling-org-apache-sling-feature-cpconverter/pull/161
# and this branch from aemanalyser-maven-plugin
https://github.com/stefanseifert/aemanalyser-maven-plugin/tree/experimental/cpconverter-update
which makes use of the SNAPSHOT
# and this test project which makes use of both:
https://github.com/stefanseifert/aem-cloud-service-deployment-issues/tree/feature/archetype-40-DRND-202-escaping-cpconverter
# build the test project, esp. the "all" module and after that inspect the
contents of
{{all/target/cp-conversion/com/aem632/aem-aem632-project.core-apps/0.0.1-SNAPSHOT/aem-aem632-project.core-apps-0.0.1-SNAPSHOT-cp2fm-converted.zip}}
and there the file {{jcr_root/apps/aem632/core/test/.content.xml}}. in
property 1, it should contain the regex with an escaped backslash (\\), but
does not (\).
> cpconverter: Sling-Initial-Content String values are not properly escaped in
> DocView XML
> ----------------------------------------------------------------------------------------
>
> Key: SLING-11785
> URL: https://issues.apache.org/jira/browse/SLING-11785
> Project: Sling
> Issue Type: Bug
> Components: Content-Package to Feature Model Converter
> Affects Versions: Content-Package to Feature Model Converter 1.3.0
> Reporter: Stefan Seifert
> Priority: Major
> Fix For: Content-Package to Feature Model Converter 1.3.2
>
>
> it seems the cpconverter is not properly escaping string values read from
> Sling-Initial-Content JSON files and then converting to DocView XML.
> in this sample project:
> https://github.com/stefanseifert/aem-cloud-service-deployment-issues/tree/feature/archetype-40-DRND-202-escaping
> i've introduces in [this
> commit|https://github.com/stefanseifert/aem-cloud-service-deployment-issues/commit/866fab64b6280c213e93dbbe5c9791f1a9877f5b]
> a JSON file in Sling-Initial-Content containing two strings with regexp
> containing "\". those strings are transferred 1:1 to the DocView XML in the
> content package, which is wrong. the "\" has to be escaped to be re-read
> properly via JCR API.
> it seems the escaping rules applied by
> {{org.apache.jackrabbit.vault.util.DocViewProperty#format}} are missing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)