diff options
author | Valentin Popov <valentin@popov.link> | 2022-11-10 03:10:04 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2022-11-10 03:10:04 +0300 |
commit | 6fb3e475ce2e4140934746df9f010dfd9109031a (patch) | |
tree | 3615019bf8f46ab2c4567d811ab0b18529e00868 | |
parent | b411c947f50fcc08fbae3b6c1b4e5252ddcfaac7 (diff) | |
download | popov.link-6fb3e475ce2e4140934746df9f010dfd9109031a.tar.xz popov.link-6fb3e475ce2e4140934746df9f010dfd9109031a.zip |
Deleted unsafe variables
Signed-off-by: Valentin Popov <valentin@popov.link>
-rw-r--r-- | templates/404.html | 4 | ||||
-rw-r--r-- | templates/base.html | 8 | ||||
-rw-r--r-- | templates/blog.html | 8 | ||||
-rw-r--r-- | templates/index.html | 12 | ||||
-rw-r--r-- | templates/post.html | 8 | ||||
-rw-r--r-- | templates/project.html | 2 | ||||
-rw-r--r-- | templates/projects.html | 12 | ||||
-rw-r--r-- | templates/robots.txt | 2 |
8 files changed, 28 insertions, 28 deletions
diff --git a/templates/404.html b/templates/404.html index 018e6f0..9dc8056 100644 --- a/templates/404.html +++ b/templates/404.html @@ -3,11 +3,11 @@ {% block content %} <div style="text-align:center;"> <h1>404</h1> - <p>Page not found.</p> + <p><strong>Page not found.</strong></p> <small> {% set subject = 'I found a broken page' %} - <p>If you see this message, please <a href="mailto:hi@popov.link?subject={{ subject | urlencode | safe }}">let me know</a>.</p> + <p>If you see this message, please <a href="mailto:hi@popov.link?subject={{ subject | trim | urlencode }}">let me know</a>.</p> </small> </div> diff --git a/templates/base.html b/templates/base.html index 4bd4fa6..4e183a8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -9,10 +9,10 @@ {% block rss %} <!-- RSS --> - <link href="{{ get_url(path='atom.xml', trailing_slash=false) | safe }}" rel="alternate" title="RSS" type="application/atom+xml" /> + <link href="{{ get_url(path='atom.xml', trailing_slash=false) | trim }}" rel="alternate" title="RSS" type="application/atom+xml" /> {% endblock %} - <title>{{ config.title | safe }}</title> + <title>{{ config.title | trim }}</title> <!-- CSS --> {% set css = load_data(path='styles.css') %} @@ -23,12 +23,12 @@ <header> <nav> {% for link in config.extra.navbar %} - <a href="{{ link.path | safe }}">{{ link.title | safe }}</a> + <a href="{{ link.path | trim }}">{{ link.title | trim }}</a> {% endfor %} <span> <span>|</span> - <a href="{{ get_url(path='atom.xml', trailing_slash=false) | safe }}">RSS</a> + <a href="{{ get_url(path='atom.xml', trailing_slash=false) | trim }}">RSS</a> </span> </nav> </header> diff --git a/templates/blog.html b/templates/blog.html index ab19803..3602385 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -1,18 +1,18 @@ {% extends 'base.html' %} {% block content %} -<h1>{{ section.title | safe }}</h1> +<h1>{{ section.title | trim }}</h1> {% for year, posts in section.pages | group_by(attribute='year') %} <section> - <h2>{{ year | safe }}</h2> + <h2>{{ year | trim }}</h2> <ul> {% for page in posts %} <li> - <time datetime="{{ page.date | date(format='%+') | safe }}">{{ page.date | date(format='%Y/%m/%d') | safe }}</time> + <time datetime="{{ page.date | date(format='%+') | trim }}">{{ page.date | date(format='%Y/%m/%d') | trim }}</time> <span>—</span> - <a href="{{ page.permalink | safe }}">{{ page.title | safe }}</a> + <a href="{{ page.permalink | trim }}">{{ page.title | trim }}</a> </li> {% endfor %} </ul> diff --git a/templates/index.html b/templates/index.html index cf822e1..3edb50d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -11,8 +11,8 @@ <ul> {% for contact in config.extra.contacts %} <li> - <span>{{ contact.title | safe }}:</span> - <a href="{{ contact.url | safe }}" rel="nofollow" target="_blank">{{ contact.name | safe }}</a> + <span>{{ contact.title | trim }}:</span> + <a href="{{ contact.url | trim }}" rel="nofollow" target="_blank">{{ contact.name | trim }}</a> </li> {% endfor %} </ul> @@ -24,9 +24,9 @@ <ul> {% for link in config.extra.links %} <li> - <a href="{{ link.url | safe }}" rel="nofollow" target="_blank">{{ link.title | safe }}</a> + <a href="{{ link.url | trim }}" rel="nofollow" target="_blank">{{ link.title | trim }}</a> <span>—</span> - <span>{{ link.description | safe }}</span> + <span>{{ link.description | trim }}</span> </li> {% endfor %} </ul> @@ -39,9 +39,9 @@ <ul> {% for page in blog.pages | slice(end=5) %} <li> - <time datetime="{{ page.date | date(format='%+') | safe }}">{{ page.date | date(format='%Y/%m/%d') | safe }}</time> + <time datetime="{{ page.date | date(format='%+') | trim }}">{{ page.date | date(format='%Y/%m/%d') | trim }}</time> <span>—</span> - <a href="{{ page.permalink | safe }}">{{ page.title | safe }}</a> + <a href="{{ page.permalink | trim }}">{{ page.title | trim }}</a> </li> {% endfor %} </ul> diff --git a/templates/post.html b/templates/post.html index 0e0d41b..a337d38 100644 --- a/templates/post.html +++ b/templates/post.html @@ -1,16 +1,16 @@ {% extends 'base.html' %} {% block content %} -<h1>{{ page.title | safe }}</h1> +<h1>{{ page.title | trim }}</h1> {{ page.content | safe }} <small> <span>Published</span> - <time datetime="{{ page.date | date(format='%+') | safe }}">{{ page.date | safe }}</time> + <time datetime="{{ page.date | date(format='%+') | trim }}">{{ page.date | trim }}</time> <span>|</span> - <a href="mailto:hi@popov.link?subject={{ page.title | urlencode | safe }}">Feedback</a> + <a href="mailto:hi@popov.link?subject={{ page.title | urlencode | trim }}">Feedback</a> <span>|</span> - <a href="{{ page.permalink | safe }}">Permalink</a> + <a href="{{ page.permalink | trim }}">Permalink</a> </small> {% endblock content %}
\ No newline at end of file diff --git a/templates/project.html b/templates/project.html index c261549..054d192 100644 --- a/templates/project.html +++ b/templates/project.html @@ -1,7 +1,7 @@ {% extends 'base.html' %} {% block content %} -<h1>{{ page.title | safe }}</h1> +<h1>{{ page.title | trim }}</h1> <section> {{ page.content | safe }} diff --git a/templates/projects.html b/templates/projects.html index b828415..5e28e0b 100644 --- a/templates/projects.html +++ b/templates/projects.html @@ -1,24 +1,24 @@ {% extends 'base.html' %} {% block content %} -<h1>{{ section.title | safe }}</h1> +<h1>{{ section.title | trim }}</h1> {% for year, projects in section.pages | group_by(attribute='year') %} <section> - <h2>{{ year | safe }}</h2> + <h2>{{ year | trim }}</h2> <div class="projects"> {% for project in projects %} <div class="project"> - <a href="{{ project.permalink | safe }}"> + <a href="{{ project.permalink | trim }}"> {% set preview = resize_image(path=project.extra.preview, width=292, height=219, op='fit') %} - <img src="{{ preview.url | safe }}" alt="preview" width="292" height="219"> + <img src="{{ preview.url | trim }}" alt="preview" width="292" height="219"> </a> - <a href="{{ project.permalink | safe }}"> - <div>{{ project.summary | safe }}</div> + <a href="{{ project.permalink | trim }}"> + <div>{{ project.summary | trim | safe }}</div> </a> </div> diff --git a/templates/robots.txt b/templates/robots.txt index f37e8a1..2f8252a 100644 --- a/templates/robots.txt +++ b/templates/robots.txt @@ -1,4 +1,4 @@ User-agent: * Disallow: Allow: / -Sitemap: {{ get_url(path='sitemap.xml') | safe }} +Sitemap: {{ get_url(path='sitemap.xml', trailing_slash=false) | trim }}
\ No newline at end of file |