Skip to content

Commit 12718af

Browse files
committed
Add some sanitization
1 parent 71a21e6 commit 12718af

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

resources/views/news/_card.antlers.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</a>
66
<div class="px-6 py-8 flex flex-col justify-between flex-1">
77
<h3 class="font-bold text-2xl text-white">
8-
<a href="{{ url }}" class="transition hover:text-yellow">{{ title }}</a>
8+
<a href="{{ url }}" class="transition hover:text-yellow">{{ title | sanitize }}</a>
99
</h3>
1010
<div class="flex items-end justify-between">
1111
<div>
@@ -14,7 +14,7 @@ <h3 class="font-bold text-2xl text-white">
1414
</div>
1515
{{ if ! hide_tag }}
1616
{{ tags limit="1" }}
17-
<a href="{{ url }}" class="px-3 py-1 text-gray-100 font-bold bg-yellow transition hover:bg-orange rounded-full text-sm">{{ title }}</a>
17+
<a href="{{ url }}" class="px-3 py-1 text-gray-100 font-bold bg-yellow transition hover:bg-orange rounded-full text-sm">{{ title | sanitize }}</a>
1818
{{ /tags }}
1919
{{ /if }}
2020
</div>

resources/views/news/show.antlers.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
<header class="max-w-3xl mx-auto">
33
{{ if tags }}
44
{{ tags }}
5-
<a href="{{ url }}" class="px-3 py-1 text-gray-100 font-bold bg-yellow transition hover:bg-orange rounded-full inline-block mb-8">{{ title | lowercase }}</a>
5+
<a href="{{ url }}" class="px-3 py-1 text-gray-100 font-bold bg-yellow transition hover:bg-orange rounded-full inline-block mb-8">{{ title | lowercase | sanitize }}</a>
66
{{ /tags }}
77
{{ /if }}
8-
<h1 class="text-5xl md:text-6xl lg:text-7xl tracking-tight text-white font-bold">{{ title }}</h1>
8+
<h1 class="text-5xl md:text-6xl lg:text-7xl tracking-tight text-white font-bold">{{ title | sanitize }}</h1>
99
<div class="flex items-center mt-12">
1010
{{ if author }}
1111
<img class="rounded-full h-16 w-16" src="{{ author:avatar }}" alt="{{ author:avatar:alt }}">

resources/views/news/tags/show.antlers.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<header class="my-12 md:my-16 lg:my-24 text-center">
22
<p class="text-green font-bold text-lg antialiased mb-4">Articles</p>
3-
<h1 class="text-6xl md:text-7xl lg:text-8xl text-white font-bold">{{ title }}</h1>
3+
<h1 class="text-6xl md:text-7xl lg:text-8xl text-white font-bold">{{ title | sanitize }}</h1>
44
</header>
55

66
<section class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 max-w-6xl mx-auto gap-x-8 gap-y-16 px-4">

0 commit comments

Comments
 (0)