22< nav class ="path-grid " aria-label ="{% if page.lang == 'zh-CN' %}学习路径{% else %}Learning paths{% endif %} ">
33 {% for path in ordered_paths %}
44 {% assign path_resources = include.resources | where: "path", path.id %}
5- < a class ="path-card " href ="#{{ path.id }} ">
6- < span class ="path-number "> 0{{ path.order }}</ span >
5+ < a class ="path-card " href ="#{{ path.id | escape }} ">
6+ < span class ="path-number "> 0{{ path.order | escape }}</ span >
77 {% if page.lang == "zh-CN" %}
8- < strong > {{ path.title_zh }}</ strong >
9- < span > {{ path.summary_zh }}</ span >
8+ < strong > {{ path.title_zh | escape }}</ strong >
9+ < span > {{ path.summary_zh | escape }}</ span >
1010 < small > {{ path_resources.size }} 条资源</ small >
1111 {% else %}
12- < strong > {{ path.title_en }}</ strong >
13- < span > {{ path.summary_en }}</ span >
12+ < strong > {{ path.title_en | escape }}</ strong >
13+ < span > {{ path.summary_en | escape }}</ span >
1414 < small > {{ path_resources.size }} resources</ small >
1515 {% endif %}
1616 </ a >
1919
2020{% for path in ordered_paths %}
2121 {% assign path_resources = include.resources | where: "path", path.id %}
22- < section class ="path-section " id ="{{ path.id }} " aria-labelledby ="{{ path.id }}-title ">
22+ < section class ="path-section " id ="{{ path.id | escape }} " aria-labelledby ="{{ path.id | escape }}-title ">
2323 < header class ="section-heading ">
2424 < div >
25- < span class ="section-eyebrow "> {% if page.lang == "zh-CN" %}路径{% else %}Path{% endif %} 0{{ path.order }}</ span >
26- < h2 id ="{{ path.id }}-title "> {% if page.lang == "zh-CN" %}{{ path.title_zh }}{% else %}{{ path.title_en }}{% endif %}</ h2 >
25+ < span class ="section-eyebrow "> {% if page.lang == "zh-CN" %}路径{% else %}Path{% endif %} 0{{ path.order | escape }}</ span >
26+ < h2 id ="{{ path.id | escape }}-title "> {% if page.lang == "zh-CN" %}{{ path.title_zh | escape }}{% else %}{{ path.title_en | escape }}{% endif %}</ h2 >
2727 </ div >
28- < p > {% if page.lang == "zh-CN" %}{{ path.summary_zh }}{% else %}{{ path.summary_en }}{% endif %}</ p >
28+ < p > {% if page.lang == "zh-CN" %}{{ path.summary_zh | escape }}{% else %}{{ path.summary_en | escape }}{% endif %}</ p >
2929 </ header >
3030
3131 < div class ="resource-grid ">
@@ -39,12 +39,12 @@ <h2 id="{{ path.id }}-title">{% if page.lang == "zh-CN" %}{{ path.title_zh }}{%
3939 {% when "official-project" %}< span class ="source-badge "> 官方项目</ span >
4040 {% endcase %}
4141 {% else %}
42- < span class ="source-badge "> {{ resource.source_type | replace: "-", " " }}</ span >
42+ < span class ="source-badge "> {{ resource.source_type | replace: "-", " " | escape }}</ span >
4343 {% endif %}
4444 {% if resource.featured %}< span class ="featured-badge "> {% if page.lang == "zh-CN" %}精选{% else %}Featured{% endif %}</ span > {% endif %}
4545 </ div >
46- < h3 > < a href ="{{ resource.url }} "> {{ resource.title }}</ a > </ h3 >
47- < p > {% if page.lang == "zh-CN" %}{{ resource.why_zh }}{% else %}{{ resource.why_en }}{% endif %}</ p >
46+ < h3 > < a href ="{{ resource.url | escape }} "> {{ resource.title | escape }}</ a > </ h3 >
47+ < p > {% if page.lang == "zh-CN" %}{{ resource.why_zh | escape }}{% else %}{{ resource.why_en | escape }}{% endif %}</ p >
4848 < ul class ="resource-meta " aria-label ="{% if page.lang == 'zh-CN' %}资源元数据{% else %}Resource metadata{% endif %} ">
4949 {% if page.lang == "zh-CN" %}
5050 {% case resource.level %}
@@ -58,15 +58,15 @@ <h3><a href="{{ resource.url }}">{{ resource.title }}</a></h3>
5858 {% when "zh" %}< li > 来源语言:中文</ li >
5959 {% when "multilingual" %}< li > 来源语言:多语言</ li >
6060 {% endcase %}
61- < li > 审核于 {{ resource.reviewed_on }}</ li >
61+ < li > 审核于 {{ resource.reviewed_on | escape }}</ li >
6262 {% else %}
63- < li > {{ resource.level | replace: "-", " " }}</ li >
63+ < li > {{ resource.level | replace: "-", " " | escape }}</ li >
6464 {% case resource.language %}
6565 {% when "en" %}< li > English</ li >
6666 {% when "zh" %}< li > Chinese</ li >
6767 {% when "multilingual" %}< li > Multilingual</ li >
6868 {% endcase %}
69- < li > Reviewed {{ resource.reviewed_on }}</ li >
69+ < li > Reviewed {{ resource.reviewed_on | escape }}</ li >
7070 {% endif %}
7171 </ ul >
7272 {% if resource.requires_key or resource.risk == "medium" %}
0 commit comments