[ 
https://issues.apache.org/jira/browse/SLING-11785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17694007#comment-17694007
 ] 

Konrad Windszus commented on SLING-11785:
-----------------------------------------

Thanks, the reason is that ContentCreator.createProperty(...) is called with 
argument propertyType == 0 (UNDEFINED), 
https://github.com/apache/sling-org-apache-sling-jcr-contentloader/blob/56a63fc9e10aa8bcd32cb86152d3a5fabc1db1e8/src/main/java/org/apache/sling/jcr/contentloader/ContentCreator.java#L79
 which is kind of unexpected. This type is not correctly escaped in FileVault 
currently (https://issues.apache.org/jira/browse/JCRVLT-693).

However I added a fallback now to set the type to 
https://developer.adobe.com/experience-manager/reference-materials/spec/jsr170/javadocs/jcr-2.0/javax/jcr/PropertyType.html#STRING
 in case {{UNDEFINED}} is passed.

> 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)

Reply via email to