mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Add JSON_HEX_TAG and JSON_HEX_QUOT to JSON output filter
This commit is contained in:
parent
3c15589fb8
commit
fe804163bf
3 changed files with 16 additions and 16 deletions
|
|
@ -44,11 +44,11 @@
|
|||
<p>The full class name is <?php echo htmlspecialchars(get_class(new Rhymix\Framework\Push), \ENT_QUOTES, 'UTF-8', true); ?>, <?php echo htmlspecialchars(Rhymix\Framework\Push::class, \ENT_QUOTES, 'UTF-8', false); ?> really.</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="barContainer" data-bar="<?php echo $this->config->context === 'JS' ? (json_encode($__Context->bar ?? '', \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES)) : htmlspecialchars(json_encode($__Context->bar ?? '', \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES), \ENT_QUOTES, 'UTF-8', false); ?>">
|
||||
<div class="barContainer" data-bar="<?php echo $this->config->context === 'JS' ? (json_encode($__Context->bar ?? '', \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES | \JSON_HEX_TAG | \JSON_HEX_QUOT)) : htmlspecialchars(json_encode($__Context->bar ?? '', \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES | \JSON_HEX_TAG | \JSON_HEX_QUOT), \ENT_QUOTES, 'UTF-8', false); ?>">
|
||||
<span<?php (function(array $__defs) { $__values = []; foreach ($__defs as $__key => $__val): if (is_numeric($__key)): $__values[] = $__val; elseif ($__val): $__values[] = $__key; endif; endforeach; if ($__values): echo ' class="'; echo htmlspecialchars(implode(' ', $__values), \ENT_QUOTES, 'UTF-8', false); echo '"'; endif; })((['a-1', 'font-normal' => $__Context->foo, 'text-blue' => false, 'bg-white' => true])); ?>></span>
|
||||
<span<?php (function(array $__defs) { $__values = []; foreach ($__defs as $__key => $__val): if (is_numeric($__key)): $__values[] = $__val; elseif ($__val): $__values[] = $__key; endif; endforeach; if ($__values): echo ' style="'; echo htmlspecialchars(implode('; ', $__values), \ENT_QUOTES, 'UTF-8', false); echo '"'; endif; })((['border-radius: 0.25rem', 'margin: 1rem' => Context::get('bar'), 'padding: 2rem' => false])); ?>></span>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript"<?php $this->config->context = "JS"; ?>>
|
||||
const bar = <?php echo $this->config->context === 'JS' ? json_encode($__Context->bar, \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES) : htmlspecialchars(json_encode($__Context->bar, \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES), \ENT_QUOTES, 'UTF-8', false); ?>;
|
||||
const bar = <?php echo $this->config->context === 'JS' ? json_encode($__Context->bar, \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES | \JSON_HEX_TAG | \JSON_HEX_QUOT) : htmlspecialchars(json_encode($__Context->bar, \JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES | \JSON_HEX_TAG | \JSON_HEX_QUOT), \ENT_QUOTES, 'UTF-8', false); ?>;
|
||||
<?php $this->config->context = "HTML"; ?></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue