in src/main/java/org/apache/sling/scripting/sightly/impl/plugin/AttributePlugin.java [61:75]
public PluginInvoke invoke(Expression expression, PluginCallInfo callInfo, CompilerContext compilerContext) {
String attributeName = decodeAttributeName(callInfo);
if (attributeName != null && MarkupUtils.isSensitiveAttribute(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
}
return (attributeName != null)
? new SingleAttributeInvoke(attributeName, expression, compilerContext)
: new MultiAttributeInvoke(expression.getRoot(), compilerContext);
}