You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:10:48 UTC
[sling-org-apache-sling-scripting-sightly-compiler] 28/31:
SLING-7024 - Sightly doesn't allow to emit style or on event attributes for
data-sly-attribute
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.scripting.sightly.compiler-1.0.10
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-compiler.git
commit f29186c9f6a1a2cbdc6fa547690682fd9d4d5a44
Author: Radu Cotescu <ra...@apache.org>
AuthorDate: Tue Aug 1 10:14:41 2017 +0000
SLING-7024 - Sightly doesn't allow to emit style or on event attributes for data-sly-attribute
* improved logging message for the AttributePlugin
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/scripting/sightly/compiler@1803633 13f79535-47bb-0310-9956-ffa450edef68
---
.../apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java
index 6243821..c2316d3 100644
--- a/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java
+++ b/src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java
@@ -62,7 +62,9 @@ public class AttributePlugin extends AbstractPlugin {
public PluginInvoke invoke(Expression expression, PluginCallInfo callInfo, CompilerContext compilerContext) {
String attributeName = decodeAttributeName(callInfo);
if (attributeName != null && MarkupUtils.isSensitiveAttribute(attributeName)) {
- String warningMessage = String.format("Refusing to generate attribute '%s' for security reasons.", attributeName);
+ String warningMessage = String.format("Sensible attribute (%s) detected: event attributes (on*) and the style attribute " +
+ "cannot be generated with the data-sly-attribute block element; if you need to output a dynamic value for " +
+ "this attribute then use an expression with an appropriate context.", attributeName);
compilerContext.getPushStream().warn(new PushStream.StreamMessage(warningMessage, expression.getRawText()));
return new DefaultPluginInvoke(); //no-op invocation
}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.