mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 11:10:57 +01:00
Merge pull request #239 from marcoscoelho/path-to-fix-html
fix html source code view
This commit is contained in:
@@ -48,6 +48,7 @@ class Application extends SilexApplication
|
||||
$this->register(new RoutingUtilServiceProvider());
|
||||
|
||||
$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'));
|
||||
|
||||
return $twig;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="readme-view"><div id="readme-content">{{ blob }}</div></div>
|
||||
|
||||
{% else %}
|
||||
<pre id="sourcecode" language="{{ fileType }}">{{ blob }}</pre>
|
||||
<pre id="sourcecode" language="{{ fileType }}">{{ blob|htmlentities|raw }}</pre>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user