$CFG->additionalhtmlfooter doesn't go through format_text()

$CFG->additionalhtmlfooter doesn't go through format_text()

by Martin Greenaway -
Number of replies: 0

Hi there,

In Moodle 3.5 STABLE, I am trying to add a site-wide footer into my site using the Additional HTML "Before body is closed" field (this field is stored as $CFG->additionalhtmlfooter).

It seems that this is not run through the "format_text()" function before being output, which means that no filters are processed against the text - specifically, in my case, I can't use multilang content in the footer, which is an issue because this is required by style guide/brand guidelines etc. Is there a specific reason why format_text is not called in this case, i.e. does format_text on the additional html fields have some adverse effects that I'm not aware of because of where the text is output in the DOM, or something?  I have a local customisation to fix this issue locally by wrapping $CFG->additionalhtmlfooter in a call to format_text in lib/outputrenderers.php:927 but I'm not sure if there was a conscious decision behind this to avoid something I'll run headlong into a little way down the line, or whether it's just an oversight?  If it's the latter I can probably create a pull request etc. but wanted to check first before sticking my oar in! smile

Any feedback is, as always, gratefully appreciated on this.

Regards,

Martin


Average of ratings: -