[MGNLFORM-249] Issue in FormStateUtil when the path contains special char Created: 30/Oct/14  Updated: 08/Dec/14  Resolved: 01/Dec/14

Status: Closed
Project: Magnolia Form Module
Component/s: processor
Affects Version/s: 2.2.7
Fix Version/s: 2.2.9

Type: Bug Priority: Neutral
Reporter: Eric Hechinger Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: quickwin
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File form.patch    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

In case the path of a node contains special char, we face encoding issues.
This would never be the case in normal usage of Form module, but in our COOP project we may have form path like 'Contact-and-Form/Aktivitätenkonzept' and this generate rendering issues.

The solution is to encode the node path before performing a sendRedirect().

The produced solution do not break normal behavior.



 Comments   
Comment by Espen Jervidalo [ 01/Dec/14 ]

Is the jsp-api dependency wanted? I don't see why that was needed?

Comment by Federico Grilli [ 01/Dec/14 ]

jsp-api is needed in tests when a WebContext is being initialised else a CNFE is thrown. Here's the essential stack trace w/o the clutter

       [...]
 info.magnolia.link.BaseLinkTest.setUp(BaseLinkTest.java:83)
	at info.magnolia.module.form.engine.FormStateUtilTest.setUp(FormStateUtilTest.java:64)
	[...]
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.PageContext
        [...]
Generated at Mon Feb 12 05:38:21 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.