WUI: backported new utils functions from perun-web-gui project.