Escape newlines in config values.

This commit is contained in:
Isaac Connor 2022-02-01 09:46:37 -05:00
parent 34d7f192b4
commit 462ec45a07
1 changed files with 4 additions and 2 deletions

View File

@ -109,7 +109,9 @@ stateStrings[STATE_TAPE] = "<?php echo translate('Record') ?>";
<?php <?php
global $config; global $config;
foreach ($config as $name=>$c) { foreach ($config as $name=>$c) {
if (!$c['Private']) if (!$c['Private']) {
echo 'const '. $name . ' = \''.$c['Value'].'\''.PHP_EOL;
echo 'const '. $name . ' = \''.preg_replace('/(\n\r?)/', '\$1', $c['Value']).'\''.PHP_EOL;
}
} }
?> ?>