Scriptlets
Scriptlets copied to clipboard
Fix 'set-attr' — scriptlet does not work as it should
So, here's the user rules:
example.com#%#//scriptlet('trusted-set-attr', 'body', 'test-attr1', 'test-val1')
example.com#%#//scriptlet('set-attr', 'body', 'test-attr2', 'test-val2')
Result:
Plus, trusted-set-attr doesn't seem to support using the attribute name as a means to concat:
example.com#%#//scriptlet('trusted-set-attr', 'body', 'test-attr3', '[test-attr1] test-attr3')
Result:
@berkant Hello. If I've understood you correctly, it seems that in your example:
example.com#%#//scriptlet('set-attr', 'body', 'test-attr2', 'test-val2')
the attribute value is not set because set-attr does not support custom values.
Unfortunately, I don't understand this example, could you please describe it in more detail:
example.com#%#//scriptlet('trusted-set-attr', 'body', 'test-attr3', '[test-attr1] test-attr3')
4 parameter in trusted-set-attr is the attribute value