Robotframework-templateddata

Latest version: v1.4.0

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.4.0

Autoscaping HTML and XML files is now enabled by default in Jinja2 templates (7). Autoescaping will enable Robot Framework users to leverage this library in order to generate HTML documents while mitigating cross site scripting (XSS) vulnerabilities. You can disable autoescaping in Jinja template using ``autoescape`` block:


{% autoescape false %}
Autoescaping is inactive within this block
{% endautoescape %}


Acknowledgements
-----
Thanks aabashkin for implementing the change.

1.3.0

Not secure
Add ``encoding`` parameter to ``Get Templated Data From Path`` keyword to support files with different encoding than default ``utf-8`` (5)

You can now change default encoding by providing it as second argument (named ``encoding``):

Get Templated Data From Path path iso-8859-15
Get Templated Data From Path path encoding=iso-8859-15
Get Templated Data From Path path default utf-8 will be used


Acknowledgements
-----
Thanks Lipq1 for finding the issue and implementing it.

1.2.0

Not secure
Added option for ignoring not defined variables. Previously all not defined variables were replaced with empty string. If you want to alter this behaviour (keep not defined name) you can now use `ignore_missing` flag:

Globally:

*** Settings ***
Library TemplatedData ignore_missing=${True}

or locally:

${data} Get Templated Data ${template} ignore_missing=${True}


When set it will convert following template (with `${ROBOT_VARIABLE}` set to `10` and `${json-unit.any-string}` not defined at all):

{ "foo": "${ROBOT_VARIABLE}", "bar": "${json-unit.any-string}" }

to

{ "foo": "10", "bar": "${json-unit.any-string}" }


The downside of using `ignore_missing` is that any default values will be ignored.

1.1.0

Not secure
Allow to nest variables inside test data:


my ${variable:${other_variable}}
dynamic ${${value}}
longer sentence ${value:put this string with ${value:5} as default}


Improved default value handling. Following test data will be parsed correctly:

${variable::} default value is ':'
${variable:} default value is ''


Known issues:
Class attributes are handled only in jinja mode:

${class_instance.attribute} it will ignore .attribute part for non jinja mode

1.0.0

Not secure
First release

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.