mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 19:20:56 +01:00
fix html source code view
This commit is contained in:
@@ -48,6 +48,7 @@ class Application extends SilexApplication
|
|||||||
$this->register(new RoutingUtilServiceProvider());
|
$this->register(new RoutingUtilServiceProvider());
|
||||||
|
|
||||||
$this['twig'] = $this->share($this->extend('twig', function($twig, $app) {
|
$this['twig'] = $this->share($this->extend('twig', function($twig, $app) {
|
||||||
|
$twig->addFilter('htmlentities', new \Twig_Filter_Function('htmlentities'));
|
||||||
$twig->addFilter('md5', new \Twig_Filter_Function('md5'));
|
$twig->addFilter('md5', new \Twig_Filter_Function('md5'));
|
||||||
|
|
||||||
return $twig;
|
return $twig;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<div class="readme-view"><div id="readme-content">{{ blob }}</div></div>
|
<div class="readme-view"><div id="readme-content">{{ blob }}</div></div>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<pre id="sourcecode" language="{{ fileType }}">{{ blob }}</pre>
|
<pre id="sourcecode" language="{{ fileType }}">{{ blob|htmlentities|raw }}</pre>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user