From 96814fc7dbd1c5c9770dc5563be2be0bc6422397 Mon Sep 17 00:00:00 2001 From: Doge Date: Tue, 11 May 2021 12:45:22 +0800 Subject: Enhancement for non-self link security --- layout/_partial/footer.ejs | 4 ++-- layout/_partial/head.ejs | 7 ++----- layout/_partial/header.ejs | 9 ++++++--- layout/_partial/scripts.ejs | 7 ++++--- 4 files changed, 14 insertions(+), 13 deletions(-) (limited to 'layout') diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 385522c..492ca72 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -4,9 +4,9 @@ Copyright © <%= date(Date.now(), 'YYYY' ) %> <%= config.title %> <%= theme.copyright %> \ No newline at end of file diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 4ad5938..86e2438 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -20,9 +20,6 @@ - - - + + \ No newline at end of file diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs index f9463f7..8ad3684 100644 --- a/layout/_partial/header.ejs +++ b/layout/_partial/header.ejs @@ -47,9 +47,12 @@ const favicon = mapping[1]; let outter = link.startsWith("https://") ? true : false; %> - - - + <% if (outter) { %> + + <% } else { %> + + <% } %> + <% } %>

diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index 9f1a769..63975f4 100644 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -33,11 +33,12 @@ <% } %> - - - <% if (is_post() && theme.podcast && page.podcast) { %> <% } %> + + + -- cgit v1.2.3