Scriptlets icon indicating copy to clipboard operation
Scriptlets copied to clipboard

Fix 'set-attr' — scriptlet does not work as it should

Open berkant opened this issue 1 year ago • 1 comments

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: image

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: image

berkant avatar Aug 10 '24 09:08 berkant

@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

jellizaveta avatar Oct 14 '24 18:10 jellizaveta