#33 use urlize filter on comments to make links clickable
Merged a year ago by lbrabec. Opened a year ago by lbrabec.

@@ -94,12 +94,13 @@ 

              {% for bug in comment[0] %}

                <a class="external" target="_blank" href="https://bugzilla.redhat.com/show_bug.cgi?id={{bug}}">#{{bug}}</a>,

              {% endfor %}

-             {% if comment[1]|length > 200 %}

-               <span>{{comment[1][:200]}}</span>

-               <span class="collapse" id="c_{{category_index}}_{{line_index}}_{{loop.index}}">{{comment[1][200:]}}</span>

+             {% if comment[1] | length > 200 %}

+               {% set cut_index = comment[1] | truncate(length=200, end="", leeway=0) | length %}

+               <span>{{comment[1] | truncate(length=200, end="", leeway=0) | urlize(80, nofollow=true, target="_blank")}}</span>

+               <span class="collapse" id="c_{{category_index}}_{{line_index}}_{{loop.index}}">{{comment[1][cut_index:] | urlize(80, nofollow=true, target="_blank")}}</span>

                <a data-toggle="collapse" class="collapse-toggle collapsed" href="#c_{{category_index}}_{{line_index}}_{{loop.index}}"></a>

              {% else %}

-               {{comment[1]}}

+               {{comment[1]|urlize(80, nofollow=true, target="_blank")}}

              {% endif %}

  

              {% if comment[0] or comment[1] %}

no initial comment

Metadata Update from @lbrabec:
- Request assigned

a year ago

Pull-Request has been merged by lbrabec

a year ago
Metadata