Merge pull request #239 from marcoscoelho/path-to-fix-html

fix html source code view
This commit is contained in:
Klaus Silveira
2013-01-17 08:01:07 -08:00
2 changed files with 2 additions and 1 deletions

View File

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

View File

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