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: contactlink #808

Open
wants to merge 5 commits into
base: v2
Choose a base branch
from
Open

fix: contactlink #808

wants to merge 5 commits into from

Conversation

mamico
Copy link

@mamico mamico commented Nov 21, 2024

sistemato ContactLink per evitare HTML injection e problemi come quello riscontrato, di codice html non valido (l'apice nel title della email rompeva l'html e il rendering della pagina)

@mamico mamico added v2 bug Something isn't working labels Nov 21, 2024
giuliaghisini
giuliaghisini previously approved these changes Nov 21, 2024
.split(/((?:\+?\d{1,3}[-.\s]?)?(?:\(?\d{3}\)?[-.\s]?)?\d{3}[-.\s]?\d+)/gm)
.map((v, i) =>
i % 2 === 0 ? (
<span key={i}>{` ${v} `}</span>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non ho capito questa cosa del %2.
cosa succede se in un campo scrivono due numeridi telefono?
tipo
"0532123456 0532112233"

Copy link
Author

@mamico mamico Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

la split fa appunto split della stringa, tornando alternativamente i match e le stringhe comprese tra i match, nel tuo caso tornerebbe

image

non sarebbe male qui metterci degli unit, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants