-
Notifications
You must be signed in to change notification settings - Fork 4
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
#2363 - WIP Réutiliser le même composant d'affichage de détail d'une convention #2465
base: main
Are you sure you want to change the base?
Conversation
1aa1abb
to
23f3e51
Compare
b824997
to
c6fb16e
Compare
c6fb16e
to
eb0d481
Compare
label: "Email", | ||
value: ( | ||
<a | ||
href={`mailto:${convention.signatories.beneficiary.email}`} |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium
DOM text
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 17 hours ago
To fix the problem, we need to ensure that the email address is properly escaped before being used in an HTML context. This can be achieved by using a library that provides HTML escaping functionality, such as he
(HTML entities).
- Import the
he
library to escape the email address. - Replace the direct usage of the email address in the
href
andtitle
attributes with the escaped version.
-
Copy modified line R27 -
Copy modified lines R64-R65
@@ -26,2 +26,3 @@ | ||
import type { ConventionValidationProps } from "./ConventionValidation"; | ||
import he from 'he'; | ||
|
||
@@ -62,4 +63,4 @@ | ||
<a | ||
href={`mailto:${convention.signatories.beneficiary.email}`} | ||
title={convention.signatories.beneficiary.email} | ||
href={`mailto:${he.encode(convention.signatories.beneficiary.email)}`} | ||
title={he.encode(convention.signatories.beneficiary.email)} | ||
> |
-
Copy modified lines R94-R96
@@ -93,2 +93,5 @@ | ||
"@emotion/styled": "^11.8.1" | ||
}, | ||
"dependencies": { | ||
"he": "^1.2.0" | ||
} |
Package | Version | Security advisories |
he (npm) | 1.2.0 | None |
label: "Email", | ||
value: ( | ||
<a | ||
href={`mailto:${convention.signatories.establishmentRepresentative.email}`} |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium
DOM text
Copilot Autofix AI about 17 hours ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
label: "Email", | ||
value: ( | ||
<a | ||
href={`mailto:${convention.establishmentTutor.email}`} |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium
DOM text
Copilot Autofix AI about 17 hours ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
WIP
📔 Remarques
MainWrapper
fait afficher le titre en dehors de<main>
=> cette correction va impacter plusieurs pages qui utilisent MainWrapper/PageHeader