You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Robert Munteanu (JIRA)" <ji...@apache.org> on 2019/08/06 07:44:00 UTC

[jira] [Updated] (SLING-6368) Eclipse IDE Publishing: Double backslashes are not correctly resolved in JCR attribute values

     [ https://issues.apache.org/jira/browse/SLING-6368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Munteanu updated SLING-6368:
-----------------------------------
    Description: 
Note: a commit reference was incorrectly made to this commit instead of SLING-6398, you might want that issue instead.

If a .content.xml file contains a attribute like this
{code}
configjson="\{&#xd;&#xa;    &quot;title&quot;: &quot;Resolved Segments&quot;,&#xd;&#xa;    &quot;icon&quot;: &quot;coral-Icon--targeted&quot;,&#xd;&#xa;    &quot;storeMapping&quot;: {&#xd;&#xa;        &quot;s&quot;: &quot;segmentation&quot;&#xd;&#xa;    },&#xd;&#xa;    &quot;template&quot;: &quot;&lt;p class=\\&quot;contexthub-module-line1\\&quot;>Resolved Segments&lt;/p>&lt;p class=\\&quot;contexthub-module-line2\\&quot;>{{s.summary}}&lt;/p>&quot;,&#xd;&#xa;    &quot;clickable&quot;: true,&#xd;&#xa;    &quot;listReference&quot;: &quot;/store/segmentation/segments&quot;,&#xd;&#xa;    &quot;listType&quot;: &quot;custom&quot;,&#xd;&#xa;    &quot;listItemTemplate&quot;: &quot;&lt;span>{{label}}&lt;/span>&quot;,&#xd;&#xa;    &quot;itemOnClickNoop&quot;: true&#xd;&#xa;}"
{code}
the double "\" is not resolved correclty.
In the JCR its value is shown as 
{code}
{
    "title": "Resolved Segments",
   "icon": "coral-Icon--targeted",
    "storeMapping": {
        "s": "segmentation"
    },
    "template": "<p class=\\"contexthub-module-line1\\">Resolved Segments</p><p class=\\"contexthub-module-line2\\">{{s.summary}}</p>",
    "clickable": true,
    "listReference": "/store/segmentation/segments",
    "listType": "custom",
    "listItemTemplate": "<span>{{label}}</span>",
    "itemOnClickNoop": true
}
{code}
(i.e. it contains double backslashes).
When being deployed through the content-package-maven-plugin the same attribute is being stored in the JCR with value 
{code}
{
    "title": "Resolved Segments",
   "icon": "coral-Icon--targeted",
    "storeMapping": {
        "s": "segmentation"
    },
    "template": "<p class=\"contexthub-module-line1\">Resolved Segments</p><p class=\"contexthub-module-line2\">{{s.summary}}</p>",
    "clickable": true,
    "listReference": "/store/segmentation/segments",
    "listType": "custom",
    "listItemTemplate": "<span>{{label}}</span>",
    "itemOnClickNoop": true
}
{code}
(i.e. only with single backslashes).
Attached is the full problematic {{.content.xml}} renamed to {{content.xml}}.

  was:
If a .content.xml file contains a attribute like this
{code}
configjson="\{&#xd;&#xa;    &quot;title&quot;: &quot;Resolved Segments&quot;,&#xd;&#xa;    &quot;icon&quot;: &quot;coral-Icon--targeted&quot;,&#xd;&#xa;    &quot;storeMapping&quot;: {&#xd;&#xa;        &quot;s&quot;: &quot;segmentation&quot;&#xd;&#xa;    },&#xd;&#xa;    &quot;template&quot;: &quot;&lt;p class=\\&quot;contexthub-module-line1\\&quot;>Resolved Segments&lt;/p>&lt;p class=\\&quot;contexthub-module-line2\\&quot;>{{s.summary}}&lt;/p>&quot;,&#xd;&#xa;    &quot;clickable&quot;: true,&#xd;&#xa;    &quot;listReference&quot;: &quot;/store/segmentation/segments&quot;,&#xd;&#xa;    &quot;listType&quot;: &quot;custom&quot;,&#xd;&#xa;    &quot;listItemTemplate&quot;: &quot;&lt;span>{{label}}&lt;/span>&quot;,&#xd;&#xa;    &quot;itemOnClickNoop&quot;: true&#xd;&#xa;}"
{code}
the double "\" is not resolved correclty.
In the JCR its value is shown as 
{code}
{
    "title": "Resolved Segments",
   "icon": "coral-Icon--targeted",
    "storeMapping": {
        "s": "segmentation"
    },
    "template": "<p class=\\"contexthub-module-line1\\">Resolved Segments</p><p class=\\"contexthub-module-line2\\">{{s.summary}}</p>",
    "clickable": true,
    "listReference": "/store/segmentation/segments",
    "listType": "custom",
    "listItemTemplate": "<span>{{label}}</span>",
    "itemOnClickNoop": true
}
{code}
(i.e. it contains double backslashes).
When being deployed through the content-package-maven-plugin the same attribute is being stored in the JCR with value 
{code}
{
    "title": "Resolved Segments",
   "icon": "coral-Icon--targeted",
    "storeMapping": {
        "s": "segmentation"
    },
    "template": "<p class=\"contexthub-module-line1\">Resolved Segments</p><p class=\"contexthub-module-line2\">{{s.summary}}</p>",
    "clickable": true,
    "listReference": "/store/segmentation/segments",
    "listType": "custom",
    "listItemTemplate": "<span>{{label}}</span>",
    "itemOnClickNoop": true
}
{code}
(i.e. only with single backslashes).
Attached is the full problematic {{.content.xml}} renamed to {{content.xml}}.


> Eclipse IDE Publishing: Double backslashes are not correctly resolved in JCR attribute values
> ---------------------------------------------------------------------------------------------
>
>                 Key: SLING-6368
>                 URL: https://issues.apache.org/jira/browse/SLING-6368
>             Project: Sling
>          Issue Type: Bug
>          Components: IDE
>    Affects Versions: Sling Eclipse IDE 1.1.0
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>            Priority: Critical
>             Fix For: Sling Eclipse IDE 1.2.0
>
>         Attachments: SLING-6368-testv02.patch, SLING-6368-v01.patch, content.xml
>
>
> Note: a commit reference was incorrectly made to this commit instead of SLING-6398, you might want that issue instead.
> If a .content.xml file contains a attribute like this
> {code}
> configjson="\{&#xd;&#xa;    &quot;title&quot;: &quot;Resolved Segments&quot;,&#xd;&#xa;    &quot;icon&quot;: &quot;coral-Icon--targeted&quot;,&#xd;&#xa;    &quot;storeMapping&quot;: {&#xd;&#xa;        &quot;s&quot;: &quot;segmentation&quot;&#xd;&#xa;    },&#xd;&#xa;    &quot;template&quot;: &quot;&lt;p class=\\&quot;contexthub-module-line1\\&quot;>Resolved Segments&lt;/p>&lt;p class=\\&quot;contexthub-module-line2\\&quot;>{{s.summary}}&lt;/p>&quot;,&#xd;&#xa;    &quot;clickable&quot;: true,&#xd;&#xa;    &quot;listReference&quot;: &quot;/store/segmentation/segments&quot;,&#xd;&#xa;    &quot;listType&quot;: &quot;custom&quot;,&#xd;&#xa;    &quot;listItemTemplate&quot;: &quot;&lt;span>{{label}}&lt;/span>&quot;,&#xd;&#xa;    &quot;itemOnClickNoop&quot;: true&#xd;&#xa;}"
> {code}
> the double "\" is not resolved correclty.
> In the JCR its value is shown as 
> {code}
> {
>     "title": "Resolved Segments",
>    "icon": "coral-Icon--targeted",
>     "storeMapping": {
>         "s": "segmentation"
>     },
>     "template": "<p class=\\"contexthub-module-line1\\">Resolved Segments</p><p class=\\"contexthub-module-line2\\">{{s.summary}}</p>",
>     "clickable": true,
>     "listReference": "/store/segmentation/segments",
>     "listType": "custom",
>     "listItemTemplate": "<span>{{label}}</span>",
>     "itemOnClickNoop": true
> }
> {code}
> (i.e. it contains double backslashes).
> When being deployed through the content-package-maven-plugin the same attribute is being stored in the JCR with value 
> {code}
> {
>     "title": "Resolved Segments",
>    "icon": "coral-Icon--targeted",
>     "storeMapping": {
>         "s": "segmentation"
>     },
>     "template": "<p class=\"contexthub-module-line1\">Resolved Segments</p><p class=\"contexthub-module-line2\">{{s.summary}}</p>",
>     "clickable": true,
>     "listReference": "/store/segmentation/segments",
>     "listType": "custom",
>     "listItemTemplate": "<span>{{label}}</span>",
>     "itemOnClickNoop": true
> }
> {code}
> (i.e. only with single backslashes).
> Attached is the full problematic {{.content.xml}} renamed to {{content.xml}}.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)