Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(create-vite): add rel="noreferrer" to links with target="_blank" #13750

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/create-vite/template-lit-ts/src/my-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export class MyElement extends LitElement {
render() {
return html`
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src=${viteLogo} class="logo" alt="Vite logo" />
</a>
<a href="https://lit.dev" target="_blank">
<a href="https://lit.dev" target="_blank" rel="noreferrer">
<img src=${litLogo} class="logo lit" alt="Lit logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-lit/src/my-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ export class MyElement extends LitElement {
render() {
return html`
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src=${viteLogo} class="logo" alt="Vite logo" />
</a>
<a href="https://lit.dev" target="_blank">
<a href="https://lit.dev" target="_blank" rel="noreferrer">
<img src=${litLogo} class="logo lit" alt="Lit logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-preact-ts/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export function App() {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} class="logo" alt="Vite logo" />
</a>
<a href="https://preactjs.com" target="_blank">
<a href="https://preactjs.com" target="_blank" rel="noreferrer">
<img src={preactLogo} class="logo preact" alt="Preact logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-preact/src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ export function App() {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} class="logo" alt="Vite logo" />
</a>
<a href="https://preactjs.com" target="_blank">
<a href="https://preactjs.com" target="_blank" rel="noreferrer">
<img src={preactLogo} class="logo preact" alt="Preact logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-qwik-ts/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export const App = component$(() => {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} class="logo" alt="Vite logo" />
</a>
<a href="https://qwik.builder.io" target="_blank">
<a href="https://qwik.builder.io" target="_blank" rel="noreferrer">
<img src={qwikLogo} class="logo qwik" alt="Qwik logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-qwik/src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export const App = component$(() => {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} class="logo" alt="Vite logo" />
</a>
<a href="https://qwik.builder.io" target="_blank">
<a href="https://qwik.builder.io" target="_blank" rel="noreferrer">
<img src={qwikLogo} class="logo qwik" alt="Qwik logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-react-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ function App() {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<a href="https://react.dev" target="_blank" rel="noreferrer">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-react/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ function App() {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<a href="https://react.dev" target="_blank" rel="noreferrer">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-solid-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ function App() {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} class="logo" alt="Vite logo" />
</a>
<a href="https://solidjs.com" target="_blank">
<a href="https://solidjs.com" target="_blank" rel="noreferrer">
<img src={solidLogo} class="logo solid" alt="Solid logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-solid/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ function App() {
return (
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src={viteLogo} class="logo" alt="Vite logo" />
</a>
<a href="https://solidjs.com" target="_blank">
<a href="https://solidjs.com" target="_blank" rel="noreferrer">
<img src={solidLogo} class="logo solid" alt="Solid logo" />
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-vanilla-ts/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { setupCounter } from './counter.ts'

document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src="${viteLogo}" class="logo" alt="Vite logo" />
</a>
<a href="https://www.typescriptlang.org/" target="_blank">
<a href="https://www.typescriptlang.org/" target="_blank" rel="noreferrer">
<img src="${typescriptLogo}" class="logo vanilla" alt="TypeScript logo" />
</a>
<h1>Vite + TypeScript</h1>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-vanilla/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { setupCounter } from './counter.js'

document.querySelector('#app').innerHTML = `
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src="${viteLogo}" class="logo" alt="Vite logo" />
</a>
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank">
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank" rel="noreferrer">
<img src="${javascriptLogo}" class="logo vanilla" alt="JavaScript logo" />
</a>
<h1>Hello Vite!</h1>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-vue-ts/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import HelloWorld from './components/HelloWorld.vue'

<template>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://vuejs.org/" target="_blank">
<a href="https://vuejs.org/" target="_blank" rel="noreferrer">
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
</a>
</div>
Expand Down
12 changes: 10 additions & 2 deletions packages/create-vite/template-vue-ts/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,21 @@ const count = ref(0)

<p>
Check out
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
<a
href="https://vuejs.org/guide/quick-start.html#local"
target="_blank"
rel="noreferrer"
>create-vue</a
>, the official Vue + Vite starter
</p>
<p>
Install
<a href="https://github.com/vuejs/language-tools" target="_blank">Volar</a>
<a
href="https://github.com/vuejs/language-tools"
target="_blank"
rel="noreferrer"
>Volar</a
>
in your IDE for a better DX
</p>
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
Expand Down
4 changes: 2 additions & 2 deletions packages/create-vite/template-vue/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import HelloWorld from './components/HelloWorld.vue'

<template>
<div>
<a href="https://vitejs.dev" target="_blank">
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
<img src="/vite.svg" class="logo" alt="Vite logo" />
</a>
<a href="https://vuejs.org/" target="_blank">
<a href="https://vuejs.org/" target="_blank" rel="noreferrer">
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
</a>
</div>
Expand Down
12 changes: 10 additions & 2 deletions packages/create-vite/template-vue/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,21 @@ const count = ref(0)

<p>
Check out
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
<a
href="https://vuejs.org/guide/quick-start.html#local"
target="_blank"
rel="noreferrer"
>create-vue</a
>, the official Vue + Vite starter
</p>
<p>
Install
<a href="https://github.com/vuejs/language-tools" target="_blank">Volar</a>
<a
href="https://github.com/vuejs/language-tools"
target="_blank"
rel="noreferrer"
>Volar</a
>
in your IDE for a better DX
</p>
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
Expand Down