orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
514 stars 220 forks source link

XForms raises exceptions when the page URL contains spaces or other "special" characters #1652

Open evlist opened 10 years ago

evlist commented 10 years ago

If the URL of a page contains a space or some other "special" character such as "<", "{", ... and probably a zillion other, XForms raises a java.net.URISyntaxException while resolving its XML Base address:

|java.net.URI$Parser                                |fail                          |URI.java                      |2825|
|java.net.URI$Parser                                |checkChars                    |URI.java                      |2998|
|java.net.URI$Parser                                |parseHierarchical             |URI.java                      |3082|
|java.net.URI$Parser                                |parse                         |URI.java                      |3040|
|java.net.URI                                       |<init>                        |URI.java                      | 595|
|org.orbeon.oxf.xforms.XFormsUtils                  |resolveXMLBase                |XFormsUtils.java              | 636|
|org.orbeon.oxf.xforms.XFormsUtils                  |resolveXMLBase                |XFormsUtils.java              | 596|
|org.orbeon.oxf.xforms.XFormsUtils                  |resolveServiceURL             |XFormsUtils.java              | 565|
|org.orbeon.oxf.xforms.XFormsModel                  |resolveInstanceURL            |XFormsModel.java              | 584|
|org.orbeon.oxf.xforms.XFormsModel                  |loadNonCachedExternalInstance |XFormsModel.java              | 654|
|org.orbeon.oxf.xforms.XFormsModel                  |loadInitialExternalInstanceFro|XFormsModel.java              | 632|
|org.orbeon.oxf.xforms.XFormsModel                  |loadInitialInstance           |XFormsModel.java              | 554|
|org.orbeon.oxf.xforms.XFormsModel                  |doModelConstruct              |XFormsModel.java              | 525|
|org.orbeon.oxf.xforms.XFormsModel                  |performDefaultAction          |XFormsModel.java              | 424|

This is easy to reproduce: take any XForms sample and update the corresponding page flow to give it a URL that contains a space!

ebruchez commented 10 years ago

Eric, did you have a workaround for this one?