Skip to content

Conversation

@Genevieve-K
Copy link
Contributor

@Genevieve-K Genevieve-K commented Aug 22, 2025

If we display the confirmation page without ID and without email access, an alert is displayed:
'You are missing the donation id to view this donation receipt.'

For a site in Russian (non latin characters), we translated this alert:
'Отсутствует идентификатор пожертвования для просмотра квитанции о пожертвовании.'

The string is "\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043a\u0432\u0438\u0442\u0430\u043d\u0446\u0438\u0438 \u043e \u043f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0438."

With give_clean(), the \ are removed.
receipt-alert

If I remove give_clean():
receipt-alert2

I let you check if other actions of give_clean() are needed. But it works without this function.

@jonwaldstein jonwaldstein self-requested a review September 18, 2025 15:50
Copy link
Contributor

@jonwaldstein jonwaldstein left a comment

Choose a reason for hiding this comment

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

Hey @Genevieve-K the main reason we use give_clean is to sanitize request data. Removing this has the potential to add a security issue - although it does look like the data is using json_encode which might make it safer. Perhaps there is another way to fix the escaping here? I would check what the request is actually returning as it could also be the front-end formatting.

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

This PR is stale because it has been open 45 days with no activity. Stale PRs will NOT be automatically closed.

@github-actions github-actions bot added the Stale label Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants