Preserve ampersand in profile website URL to fix broken links
What does this MR do and why?
When the feature flag validate_sanitizable_user_details is disabled, profile Website URL was being sanitized with Sanitize.clean(), which encodes & as &. That broke URLs with query parameters (e.g. https://example.com/q=user&somekey became https://example.com/q=user&somekey), so the saved link no longer worked.
This MR keeps sanitization for website_url (to strip HTML/scripts) but restores & after sanitization for that field only, so the stored value remains a valid URL. The same pattern is already used for location and organization. The spec for the legacy path is updated so website_url is expected to preserve &.
References
Resolves : #588853 (closed)
Screenshots or screen recordings
| Before | After |
|---|---|
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.