summaryrefslogtreecommitdiffstats
path: root/fatcat_scholar/templates/search_macros.html
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-10-14 02:01:18 -0700
committerBryan Newbold <bnewbold@archive.org>2020-10-14 02:01:21 -0700
commitc40e9bc039b425b385a478cbbbc46df934c98961 (patch)
treec99a336b245fff0093714ed9b803340a3a6ee4ea /fatcat_scholar/templates/search_macros.html
parent67104f3bb3d7cb21b57ed7f394154b91810faa3a (diff)
downloadfatcat-scholar-c40e9bc039b425b385a478cbbbc46df934c98961.tar.gz
fatcat-scholar-c40e9bc039b425b385a478cbbbc46df934c98961.zip
web: rel=noopener for outlinks
Via Lighthouse. Apparently destination pages can reach-back to the opening window via JS API. Weird! Note that instead of noreferrer, we have a meta tag to have off-domain (off-origin) links only include the origin name (eg, hostname) instead of full URL with query paths. So we don't forward user queries to non-archive.org domains.
Diffstat (limited to 'fatcat_scholar/templates/search_macros.html')
-rw-r--r--fatcat_scholar/templates/search_macros.html26
1 files changed, 13 insertions, 13 deletions
diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html
index 3f2826f..3899144 100644
--- a/fatcat_scholar/templates/search_macros.html
+++ b/fatcat_scholar/templates/search_macros.html
@@ -31,7 +31,7 @@
<div style="margin-bottom: 0.1em; font-size: 1.2em; font-weight: bold;">
{% if paper.doc_type == "work" %}
- <a href="https://fatcat.wiki/release/{{ paper.biblio.release_ident }}" style="color: #2224c7;" target="_blank">
+ <a href="https://fatcat.wiki/release/{{ paper.biblio.release_ident }}" style="color: #2224c7;" target="_blank" rel="noopener">
{% if paper.biblio.title %}
{{ paper.biblio.title[:512] }}
{% if paper.biblio.title|length > 512 %}...{% endif %}
@@ -61,7 +61,7 @@
{% endif %}
{% elif paper.doc_type == "sim_page" %}
- <a target="_blank" href="https://archive.org/details/{{ paper.ia_sim.issue_item }}/page/{{ paper.ia_sim.first_page }}" style="color: #2224c7;">Page {{ paper.ia_sim.first_page }}</a> <a target="_blank" href="https://archive.org/details/{{ paper.ia_sim.issue_item }}" style="color: #2224c7;">of {{ paper.biblio.container_name }} Vol. {{ paper.biblio.volume }}, Issue {{ paper.biblio.issue }}</a>
+ <a target="_blank" rel="noopener" href="https://archive.org/details/{{ paper.ia_sim.issue_item }}/page/{{ paper.ia_sim.first_page }}" style="color: #2224c7;">Page {{ paper.ia_sim.first_page }}</a> <a target="_blank" rel="noopener" href="https://archive.org/details/{{ paper.ia_sim.issue_item }}" style="color: #2224c7;">of {{ paper.biblio.container_name }} Vol. {{ paper.biblio.volume }}, Issue {{ paper.biblio.issue }}</a>
<span style="font-weight: normal; text-transform: uppercase; font-weight: bold;">[{{ _("page") }}]</span>
{% endif %}
@@ -83,9 +83,9 @@
{% if paper.biblio.container_name %}
<i>
{% if paper.biblio.container_ident %}
- <a target="_blank" href="https://fatcat.wiki/container/{{ paper.biblio.container_ident }}" style="color: black;">{{ paper.biblio.container_name }}</a>
+ <a target="_blank" rel="noopener" href="https://fatcat.wiki/container/{{ paper.biblio.container_ident }}" style="color: black;">{{ paper.biblio.container_name }}</a>
{% elif paper.doc_type == "sim_page" %}
- <a target="_blank" href="https://archive.org/details/{{ paper.ia_sim.pub_collection }}" style="color: black;">{{ paper.biblio.container_name }}</a>
+ <a target="_blank" rel="noopener" href="https://archive.org/details/{{ paper.ia_sim.pub_collection }}" style="color: black;">{{ paper.biblio.container_name }}</a>
{% else %}
{{ paper.biblio.container_name }}
{% endif %}
@@ -130,19 +130,19 @@
{# ### IDENTIFIERS #}
{% if paper.biblio.doi %}
- <a target="_blank" href="https://doi.org/{{paper.biblio.doi }}" style="color: green;">doi:{{ paper.biblio.doi }}</a> &nbsp;
+ <a target="_blank" rel="noopener noreferrer" href="https://doi.org/{{paper.biblio.doi }}" style="color: green;">doi:{{ paper.biblio.doi }}</a> &nbsp;
{% endif %}
{% if paper.biblio.pmid %}
- <a target="_blank" href="https://www.ncbi.nlm.nih.gov/pubmed/{{paper.biblio.pmid }}" style="color: green;">pmid:{{ paper.biblio.pmid }}</a> &nbsp;
+ <a target="_blank" rel="noopener" href="https://www.ncbi.nlm.nih.gov/pubmed/{{paper.biblio.pmid }}" style="color: green;">pmid:{{ paper.biblio.pmid }}</a> &nbsp;
{% endif %}
{% if paper.biblio.pmcid %}
- <a target="_blank" href="https://pubmed.ncbi.nlm.nih.gov/{{paper.biblio.pmcid }}/" style="color: green;">pmcid:{{ paper.biblio.pmcid }}</a> &nbsp;
+ <a target="_blank" rel="noopener" href="https://pubmed.ncbi.nlm.nih.gov/{{paper.biblio.pmcid }}/" style="color: green;">pmcid:{{ paper.biblio.pmcid }}</a> &nbsp;
{% endif %}
{% if paper.biblio.arxiv_id %}
- <a target="_blank" href="https://arxiv.org/abs/{{paper.biblio.arxiv_id }}" style="color: green;">arXiv:{{ paper.biblio.arxiv_id }}</a> &nbsp;
+ <a target="_blank" rel="noopener" href="https://arxiv.org/abs/{{paper.biblio.arxiv_id }}" style="color: green;">arXiv:{{ paper.biblio.arxiv_id }}</a> &nbsp;
{% endif %}
{% if paper.biblio.release_ident %}
- <a target="_blank" href="https://fatcat.wiki/release/{{paper.biblio.release_ident}}" style="color: green;">fatcat:{{ paper.biblio.release_ident}}</a> &nbsp;
+ <a target="_blank" rel="noopener" href="https://fatcat.wiki/release/{{paper.biblio.release_ident}}" style="color: green;">fatcat:{{ paper.biblio.release_ident}}</a> &nbsp;
{% endif %}
<div style="margin-top: 0.2em;">
@@ -151,7 +151,7 @@
{# TODO: remove doc for ES 7.x-style lack of type #}
{# TODO: only show 'json' link if from cluster? #}
{% if debug_mode %}
- <a target="_blank" href="{{ settings.ELASTICSEARCH_BACKEND }}/{{ settings.ELASTICSEARCH_FULLTEXT_INDEX }}/_doc/{{ paper.key }}">
+ <a target="_blank" rel="noopener" href="{{ settings.ELASTICSEARCH_BACKEND }}/{{ settings.ELASTICSEARCH_FULLTEXT_INDEX }}/_doc/{{ paper.key }}">
<span class="ui label small" title="search document JSON debug link">json</span>
</a>
{% endif %}
@@ -260,19 +260,19 @@
{% if paper.fulltext and paper.fulltext.access_url %}
{% if paper.fulltext.thumbnail_url %}
<div class="ui serp card" style="margin-bottom: 0.2em;">
- <a class="image" target="_blank" href="{{ paper.fulltext.access_url}}">
+ <a class="image" target="_blank" rel="noopener" href="{{ paper.fulltext.access_url}}">
<img src="{{ paper.fulltext.thumbnail_url }}">
</a>
</div>
{% else %}
<div class="ui serp card" style="margin-bottom: 0.2em; box-shadow: none;">
- <a class="image" target="_blank" href="{{ paper.fulltext.access_url}}" style="background: none;">
+ <a class="image" target="_blank" rel="noopener" href="{{ paper.fulltext.access_url}}" style="background: none;">
<img src="/static/document-icon.svg" style="opacity: 0.6;">
</a>
</div>
{% endif %}
<div class="fulltext-link" style="width: 100%; opacity: 1.0; text-align: center; overflow: hidden;">
- <a target="_blank" href="{{ paper.fulltext.access_url}}">
+ <a target="_blank" rel="noopener" href="{{ paper.fulltext.access_url}}">
<span>
{% if paper.fulltext.access_type == "wayback" %}
web.archive.org