8
8
- author[.name] string|Author The author's name of the linked content.
9
9
- author.url string The author's URL of the linked content.
10
10
- source string Link to the source code of the link's destination.
11
-
11
+
12
12
Parameters:
13
13
title string The title of this list of links.
14
14
link Link[] The link objects to display in the list.
15
15
class string A CSS class that should be applied to the list's container.
16
16
{% endcomment %}
17
17
18
18
19
- < div class ="link-list {{ include.class }} ">
20
- < h3 > {{ include.title }}</ h3 >
19
+ < div class ="link-list {{ include.class | xml_escape }} ">
20
+ < h3 > {{ include.title | xml_escape }}</ h3 >
21
21
< ul >
22
22
{% for link in include.links %}
23
23
< li >
@@ -36,7 +36,7 @@ <h3>{{ include.title }}</h3>
36
36
{% assign url = link.url %}
37
37
{% endif %}
38
38
39
-
39
+
40
40
{% comment %} Generate link based on its destination (internal or external). {% endcomment %}
41
41
{% if url contains 'http://' or url contains 'https://' %}
42
42
@@ -49,16 +49,16 @@ <h3>{{ include.title }}</h3>
49
49
{% else %}
50
50
51
51
{% comment %} No link, just show the text. {% endcomment %}
52
- < span class ="fake-link "> {{ link.title }}</ span >
52
+ < span class ="fake-link "> {{ link.title | xml_escape }}</ span >
53
53
{% endif %}
54
54
55
55
56
56
{% comment %} Link to the destination's author. {% endcomment %}
57
57
{% if link.author %}
58
58
{% if link.author.url %}
59
- < i > by < a href ="{{ link.author.url }} " target ="blank "> {{ link.author.name }}</ a > </ i >
59
+ < i > by < a href ="{{ link.author.url }} " target ="blank "> {{ link.author.name | xml_escape }}</ a > </ i >
60
60
{% else %}
61
- < i > by {{ link.author.name | default: link.author }}</ i >
61
+ < i > by {{ link.author.name | default: link.author | xml_escape }}</ i >
62
62
{% endif %}
63
63
{% endif %}
64
64
0 commit comments