Commit 5d255ff
Forms: Display URL field values as clickable links in submission page (#46593)
* Forms: Display URL field values as clickable links in submission page
Add get_url_value_as_link() method to render URL field values as clickable
anchor tags in the form submission confirmation page.
- Check for 'url' field type in get_render_web_value()
- Validate URLs with esc_url() allowing only http/https protocols
- Links open in new tab with rel="noopener noreferrer" for security
- Invalid URLs are displayed as plain escaped text
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Minor code format change
* Fix Phan return type for get_render_web_value()
Update PHPDoc return type to string|array since URL fields now return
an array structure.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix E2E test: only populate URL anchor text when URL exists
The anchor element now only gets text content when there's actually a URL,
preventing duplicate text elements that cause Playwright's getByText to
match multiple elements.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix URL field rendering in submission confirmation
- Revert the && condition in data-wp-text that broke URL rendering
(Interactivity API doesn't support && operator in expressions)
- Fix E2E test to use :visible selector to avoid matching both
hidden .field-value and visible .field-url elements
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add changelog for E2E test update
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Preserve original URL input for display text
Add 'displayValue' field to URL field rendering to explicitly preserve
the user's original input (e.g., 'google.com') for display text, while
'url' is used for href and may have https:// prepended.
This ensures the link text shows what the user typed, not the normalized URL.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/21138153253
Upstream-Ref: Automattic/jetpack@f07329c1 parent 6d5ff67 commit 5d255ff
File tree
0 file changed
+0
-0
lines changed0 file changed
+0
-0
lines changed
0 commit comments