[
https://issues.apache.org/jira/browse/SLING-6490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15842830#comment-15842830
]
Feike Visser commented on SLING-6490:
-------------------------------------
tested this, but the file-location gets wrongly escaped now:
{code}
'\2f content\2f dam\2fwe-retail\2f en\2f experiences\2f
arctic-surfing-in-lofoten\2f camp-fire.jpg'
{code}
Sightly syntax:
{code}
style="backgroundimage: url('${ fv.style @ context='styleString'}')
{code}
Java:
{code}
public class Style {
public String style =
"/content/dam/we-retail/en/experiences/arctic-surfing-in-lofoten/camp-fire.jpg";
}
{code}
> Sightly doesn't render valid style attribute-value
> --------------------------------------------------
>
> Key: SLING-6490
> URL: https://issues.apache.org/jira/browse/SLING-6490
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Reporter: Feike Visser
> Assignee: Radu Cotescu
> Labels: Sightly
>
> I have the following piece of Java:
> {code}
> public class Style {
> public String style = "background-image: url('/path/to/image.jpg');";
> }
> {code}
> I can't get this value printed unless I use @ context = 'unsafe'
> {code}
> <div class="container" data-sly-use.fv="Style" style="${ fv.style @
> context='styleToken' }">
>
> </div>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)