FIX: template-lint uses strict rel-noopener rule which requires noreferrer (#9449)
This commit is contained in:
parent
b6c19cba20
commit
98039e6cc5
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
"deprecated-render-helper": true,
|
||||
"require-valid-alt-text": false,
|
||||
"linebreak-style": true,
|
||||
"link-rel-noopener": true,
|
||||
"link-rel-noopener": "strict",
|
||||
"no-abstract-roles": true,
|
||||
"no-args-paths": true,
|
||||
"no-attrs-in-components": true,
|
||||
|
@ -43,7 +43,7 @@ module.exports = {
|
|||
"no-unnecessary-concat": true,
|
||||
"no-unnecessary-component-helper": true,
|
||||
"no-unused-block-params": true,
|
||||
"quotes": "double",
|
||||
quotes: "double",
|
||||
"require-button-type": true,
|
||||
"require-iframe-title": true,
|
||||
"require-valid-alt-text": false,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<h1>{{i18n "admin.badges.badge_intro.title"}}</h1>
|
||||
<div class="external-resources">
|
||||
{{#each badgeIntroLinks as |link|}}
|
||||
<a href={{link.href}} class="external-link" target="_blank" rel="noopener">
|
||||
<a href={{link.href}} class="external-link" target="_blank" rel="noopener noreferrer">
|
||||
{{d-icon link.icon}}
|
||||
<span>{{i18n link.text}}</span>
|
||||
</a>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
{{#if model.description}}
|
||||
{{#if model.description_link}}
|
||||
<a target="_blank" rel="noopener" href={{model.description_link}} class="info" data-tooltip={{model.description}}>
|
||||
<a target="_blank" rel="noopener noreferrer" href={{model.description_link}} class="info" data-tooltip={{model.description}}>
|
||||
{{d-icon "question-circle"}}
|
||||
</a>
|
||||
{{else}}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
{{#if versionCheck.gitLink}}
|
||||
<div class="sha-link">
|
||||
(
|
||||
<a href={{versionCheck.gitLink}} rel="noopener" target="_blank">
|
||||
<a href={{versionCheck.gitLink}} rel="noopener noreferrer" target="_blank">
|
||||
{{versionCheck.shortSha}}
|
||||
</a>
|
||||
)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div class="admin-footer">
|
||||
<div class="status-actions">
|
||||
{{#unless model.changed}}
|
||||
<a href={{previewUrl}} rel="noopener" title={{i18n "admin.customize.explain_preview"}} class="preview-link" target="_blank">
|
||||
<a href={{previewUrl}} rel="noopener noreferrer" title={{i18n "admin.customize.explain_preview"}} class="preview-link" target="_blank">
|
||||
{{i18n "admin.customize.preview"}}
|
||||
</a>
|
||||
{{/unless}}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
<div class="external-resources">
|
||||
{{#each externalResources as |resource|}}
|
||||
<a href={{resource.link}} class="external-link" rel="noopener" target="_blank">
|
||||
<a href={{resource.link}} class="external-link" rel="noopener noreferrer" target="_blank">
|
||||
{{d-icon resource.icon}}
|
||||
{{i18n resource.key}}
|
||||
</a>
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
<ul class="removable-list">
|
||||
{{#each model.uploads as |upload|}}
|
||||
<li>
|
||||
<span class="col">${{upload.name}}: <a href={{upload.url}} rel="noopener" target="_blank">{{upload.filename}}</a></span>
|
||||
<span class="col">${{upload.name}}: <a href={{upload.url}} rel="noopener noreferrer" target="_blank">{{upload.filename}}</a></span>
|
||||
<span class="col">
|
||||
{{d-button action=(action "removeUpload") actionParam=upload class="second btn-default btn-default cancel-edit" icon="times"}}
|
||||
</span>
|
||||
|
@ -241,8 +241,8 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
<a href={{previewUrl}} title={{i18n "admin.customize.explain_preview"}} rel="noopener" target="_blank" class="btn btn-default">{{d-icon "desktop"}}{{i18n "admin.customize.theme.preview"}}</a>
|
||||
<a class="btn btn-default export" rel="noopener" target="_blank" href={{downloadUrl}}>{{d-icon "download"}} {{i18n "admin.export_json.button_text"}}</a>
|
||||
<a href={{previewUrl}} title={{i18n "admin.customize.explain_preview"}} rel="noopener noreferrer" target="_blank" class="btn btn-default">{{d-icon "desktop"}}{{i18n "admin.customize.theme.preview"}}</a>
|
||||
<a class="btn btn-default export" rel="noopener noreferrer" target="_blank" href={{downloadUrl}}>{{d-icon "download"}} {{i18n "admin.export_json.button_text"}}</a>
|
||||
|
||||
{{d-button action=(action "switchType") label="admin.customize.theme.convert" icon=convertIcon class="btn-default btn-normal" title=convertTooltip}}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<div>
|
||||
<h4>{{i18n "admin.dashboard.discourse_last_updated"}} </h4>
|
||||
<p>{{format-date model.attributes.discourse_updated_at leaveAgo="true"}}</p>
|
||||
<a rel="noopener" target="_blank" href={{model.attributes.release_notes_link}} class="btn btn-default">
|
||||
<a rel="noopener noreferrer" target="_blank" href={{model.attributes.release_notes_link}} class="btn btn-default">
|
||||
{{i18n "admin.dashboard.whats_new_in_discourse"}}
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{{#each themes as |theme|}}
|
||||
<div class="popular-theme-item">
|
||||
<div class="popular-theme-name">
|
||||
<a href={{theme.meta_url}} rel="noopener" target="_blank">
|
||||
<a href={{theme.meta_url}} rel="noopener noreferrer" target="_blank">
|
||||
{{#if theme.component}}
|
||||
{{d-icon "puzzle-piece" title="admin.customize.theme.component"}}
|
||||
{{/if}}
|
||||
|
@ -33,7 +33,7 @@
|
|||
action=(action "installThemeFromList" theme.value)}}
|
||||
|
||||
{{#if theme.preview}}
|
||||
<a href={{theme.preview}} rel="noopener" target="_blank">{{d-icon "desktop"}} {{i18n "admin.customize.theme.preview"}}</a>
|
||||
<a href={{theme.preview}} rel="noopener noreferrer" target="_blank">{{d-icon "desktop"}} {{i18n "admin.customize.theme.preview"}}</a>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="popular-theme-name">
|
||||
{{theme.name}}
|
||||
{{#if theme.preview}}
|
||||
<a href={{theme.preview}} title="Preview" rel="noopener" target="_blank">{{d-icon "far-eye"}}</a>
|
||||
<a href={{theme.preview}} title="Preview" rel="noopener noreferrer" target="_blank">{{d-icon "far-eye"}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="popular-theme-buttons">
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<td class="plugin-name">
|
||||
{{#if plugin.url}}
|
||||
<a href={{plugin.url}} rel="noopener" target="_blank">{{plugin.name}}</a>
|
||||
<a href={{plugin.url}} rel="noopener noreferrer" target="_blank">{{plugin.name}}</a>
|
||||
{{else}}
|
||||
{{plugin.name}}
|
||||
{{/if}}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<a download="backup_codes.txt"
|
||||
class="btn no-text btn-icon backup-codes-download-btn"
|
||||
rel="noopener"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
href="data:application/octet-stream;charset=utf-8;base64,{{base64BackupCode}}">
|
||||
{{d-icon "download"}}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<dt>{{i18n "ip_lookup.location"}}</dt>
|
||||
<dd>
|
||||
{{#if location.location}}
|
||||
<a href="https://maps.google.com/maps?q={{location.latitude}},{{location.longitude}}" rel="noopener" target="_blank">
|
||||
<a href="https://maps.google.com/maps?q={{location.latitude}},{{location.longitude}}" rel="noopener noreferrer" target="_blank">
|
||||
{{location.location}}
|
||||
</a>
|
||||
{{else}}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<div class="reviewable-user-details website">
|
||||
<div class="name">{{i18n "review.user.website"}}</div>
|
||||
<div class="value">
|
||||
<a href={{reviewable.payload.website}} target="_blank" rel="noopener">{{reviewable.payload.website}}</a>
|
||||
<a href={{reviewable.payload.website}} target="_blank" rel="noopener noreferrer">{{reviewable.payload.website}}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div class="current-url">
|
||||
{{i18n "topic.publish_page.publish_url"}}
|
||||
<div>
|
||||
<a href={{publishedPage.url}} target="_blank" rel="noopener">{{publishedPage.url}}</a>
|
||||
<a href={{publishedPage.url}} target="_blank" rel="noopener noreferrer">{{publishedPage.url}}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<td class="topic-title">
|
||||
<div class="combined-title">
|
||||
{{topic-status topic=rt}}
|
||||
<a href={{rt.relative_url}} rel="noopener" target="_blank">{{replace-emoji rt.fancy_title}}</a>
|
||||
<a href={{rt.relative_url}} rel="noopener noreferrer" target="_blank">{{replace-emoji rt.fancy_title}}</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="reviewable-count">
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
<div class="details">
|
||||
{{i18n "topic.publish_page.topic_published"}}
|
||||
<div>
|
||||
<a href={{model.publishedPage.url}} target="_blank" rel="noopener">{{model.publishedPage.url}}</a>
|
||||
<a href={{model.publishedPage.url}} target="_blank" rel="noopener noreferrer">{{model.publishedPage.url}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="controls">
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{{d-button icon="plus" action=(route-action "showInvite") label="user.invited.create"}}
|
||||
{{#if canBulkInvite}}
|
||||
{{csv-uploader uploading=uploading}}
|
||||
<a href="https://meta.discourse.org/t/sending-bulk-user-invites/16468" rel="noopener" target="_blank" style="color:black;">{{d-icon "question-circle"}}</a>
|
||||
<a href="https://meta.discourse.org/t/sending-bulk-user-invites/16468" rel="noopener noreferrer" target="_blank" style="color:black;">{{d-icon "question-circle"}}</a>
|
||||
{{/if}}
|
||||
{{#if showBulkActionButtons}}
|
||||
{{#if rescindedAll}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{#each popular_components as |theme|}}
|
||||
<a class="popular-theme-item" href={{theme.meta_url}} rel="noopener" target="_blank">
|
||||
<a class="popular-theme-item" href={{theme.meta_url}} rel="noopener noreferrer" target="_blank">
|
||||
{{theme.name}}
|
||||
</a>
|
||||
{{/each}}
|
||||
|
|
Loading…
Reference in New Issue