@Random Penguin Let's see, you would have to write something like this:
function bookface_custom_footer(string &$body)
{
$t = Renderer::getMarkupTemplate('footer.tpl', 'addon/bookface');
$html = Renderer::replaceMacros($t, [
'$global_font' => DI::pConfig()->get($uid, 'bookface_custom', 'global_font');
...
]);
$body .= $html;
}And then the template file itself:
<style type="text/css">:root{
{{if $global_font}}--global-font-family: {{$global_font}};{{/if}}
...
}</style>And now it doesn't matter what people put in the
global_font config value, it should be escaped in the output.