Files
webgui/emhttp/plugins/dynamix/include/DefaultPageLayout/MainContentTabless.php
Zack Spear 9d0db98241 feat: implement safe title processing in MainContent, MainContentTabbed, and MainContentTabless
- Introduced a new function `processTitle` to safely handle page titles by replacing PHP variables with their values without using eval.
- Updated title handling in MainContent, MainContentTabbed, and MainContentTabless to utilize the new `processTitle` function, enhancing security and maintainability.
2025-05-09 13:23:03 -07:00

25 lines
748 B
PHP

<?php
/**
* Non-tabbed content template for the Unraid web interface.
* Renders all pages in sequence without tabs, using original per-page logic.
*/
?>
<div id="displaybox">
<div class="content">
<? foreach ($pages as $page): ?>
<? annotate($page['file']); ?>
<? if (isset($page['Title'])): ?>
<div class="title">
<? $title = processTitle($page['Title']); ?>
<?= tab_title($title, $page['root'], _var($page, 'Tag', false)) ?>
</div>
<? endif; ?>
<?= generatePanels($page, $path, $defaultIcon, $docroot, true) ?>
<? eval('?>'.generateContent($page)); ?>
<? endforeach; ?>
</div>
</div>