I installed gitlist on my developer server and i am trying to style the git description file of a git repository.
I tried to inject html code inside the description file but this is not recognized as html but as text.
After that, i tried to find and edit the php file of gitlist which is not allowing me to style the description file, but i didn't found something.
Is there anyone who could help me?
git-description-style http://dev.siggouroglou.gr/git-description-problem.png
From the GitList homepage:
Twig is often deployed with its
escaperextension enabled, which is a relatively safe default setting. With this setting enabled, any text put into Twig templates will be escaped by default, e.g. HTML escaping will turn<into<. This extension also supports JavaScript escaping.While this setting is enabled (and I recommend keeping it enabled), you can use the
rawfilter in templates to disable escaping of certain elements. This will require modifying the template code.Assuming your description is in a variable called
description, something like this in the appropriate template should do the trick:Note that permitting raw output does decrease your security. Make sure you trust your users not to put anything harmful into their repository descriptions.