-
Notifications
You must be signed in to change notification settings - Fork 0
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: encodage des commentaires #454
base: develop
Are you sure you want to change the base?
Conversation
b4c322d
to
7dc7c4c
Compare
@@ -15,16 +16,24 @@ export const submitDemandeSchema = { | |||
compensationCfd: z.string().optional(), | |||
compensationCodeDispositif: z.string().optional(), | |||
compensationRentreeScolaire: z.coerce.number().optional(), | |||
motif: z.array(z.string()).optional(), | |||
autreMotif: z.string().optional(), | |||
motif: z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas nécessaire ici, la liste des motifs possibles est figée et controlée côté front (d'ailleurs on devrait peut-être utiliser une enum)
@@ -33,8 +42,13 @@ export const submitDemandeSchema = { | |||
capaciteApprentissage: z.coerce.number().optional(), | |||
capaciteApprentissageColoree: z.coerce.number().optional(), | |||
statut: DemandeStatutZodType.exclude(["supprimée"]), | |||
motifRefus: z.array(z.string()).optional(), | |||
autreMotifRefus: z.string().optional(), | |||
motifRefus: z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
même chose
@@ -22,8 +23,13 @@ export const submitIntentionSchema = { | |||
capaciteApprentissage: z.coerce.number().optional(), | |||
capaciteApprentissageColoree: z.coerce.number().optional(), | |||
// Précisions | |||
motif: z.array(z.string()).optional(), | |||
autreMotif: z.string().optional(), | |||
motif: z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
même chose
// Statut | ||
statut: DemandeStatutZodType.exclude(["supprimée"]), | ||
motifRefus: z.array(z.string()).optional(), | ||
autreMotifRefus: z.string().optional(), | ||
motifRefus: z |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
même chose
numero: formId, | ||
...values, | ||
commentaire: escapeString(values.commentaire), | ||
motif: values.motif?.map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
même chose, pas nécessaire du coup
(motif) => escapeString(motif) as string | ||
), | ||
autreMotif: escapeString(values.autreMotif), | ||
motifRefus: values.motifRefus?.map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
même chose
numero: formId, | ||
...values, | ||
commentaire: escapeString(values.commentaire), | ||
motif: values.motif?.map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
même chose
(motif) => escapeString(motif) as string | ||
), | ||
autreMotif: escapeString(values.autreMotif), | ||
motifRefus: values.motifRefus?.map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
même chose
commentaire: escapeString( | ||
values.commentaire | ||
), | ||
motif: values.motif?.map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
même chose
(motif) => escapeString(motif) as string | ||
), | ||
autreMotif: escapeString(values.autreMotif), | ||
motifRefus: values.motifRefus?.map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
même chose
7dc7c4c
to
11ad305
Compare
11ad305
to
463df46
Compare
Encodage des champs commentaires qui pourraient être rejetés par le WAF