fix html source code view

This commit is contained in:
Marcos Coelho
2013-01-03 00:22:48 -02:00
parent 5cf1e15605
commit 40d18bb825
2 changed files with 2 additions and 1 deletions

View File

@@ -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;

View File

@@ -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>