Improved the renderers encoding by using the template encoding or encoding specified in a property
This commit is contained in:
parent
538a8d35ae
commit
9738ecb0ba
34 changed files with 197 additions and 61 deletions
|
@ -44,7 +44,9 @@ public class EncodeBase64 implements ValueRenderer {
|
|||
*/
|
||||
@Override
|
||||
public String render(Template template, String valueId, String differentiator) {
|
||||
return StringUtils.encodeBase64(template.getValueOrAttribute(differentiator)
|
||||
.getBytes(StandardCharsets.UTF_8));
|
||||
var properties = RenderUtils.parsePropertiesString(template.getDefaultValue(valueId));
|
||||
return RenderUtils.encode(
|
||||
StringUtils.encodeBase64(template.getValueOrAttribute(differentiator).getBytes(StandardCharsets.UTF_8)),
|
||||
properties);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue