use urlize filter on comments to make links clickable #33
1 changed files with 5 additions and 4 deletions
|
|
@ -94,12 +94,13 @@ Click on the <strong class="btn btn-success btn-xs">Enter result</strong> button
|
|||
{% 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] %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue