[
http://jira.dspace.org/jira/browse/DS-399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tim Donohue updated DS-399:
---------------------------
Attachment: license-parse-error.patch
I've got a proposed patch for this issue (see above). The patch is small, but
I wanted to explain what all I did (and didn't do) and why.
(1) In the XMLUI, the license is always stored as Plain Text in the assetstore
(just like in JSPUI), even if that content contains some basic HTML tags within
it.
(2) By default, the XMLUI was attempting to validate all inputs as valid XML.
I've disabled this check for both the License field and Provenance field (see
EditCollectionMetadataForm..java changes in patch file). This ensures you
don't see warnings if you use "<" or ">" in either of those fields.
(3) I did NOT remove the XMLUI's ability to accept XHTML in the Collection
License input field. It no longer validates the XHTML for you. But if you
input valid XHTML tags in your license, they will be displayed properly on the
License Step of the Submission process (to allow for very basic HTML formatting
of license text if necessary). However, as stated, the License will always be
saved as a plain text file behind the scenes. So, <br/> will appear as plain
text "<br/>" in the license.txt file, but will be displayed as an actual HTML
line break in the Submission UI.
(4) I had to make a small change to Wing's SimpleHTMLFragment class (again see
patch) to make sure it doesn't insert error messages into an XMLUI page's text.
Previously, it would add any XML validation errors into the text of a License
in the License step of the submission UI. Since we want to support non-XML
Licenses, we need to ensure this is not how an error is displayed to a user.
(5) The XMLUI supports HTML in the Copyright input fields for both Collection
and Communities -- the label used to say "Plain Text", but I changed it to say
"HTML", since HTML is supported and handled properly. (see messages.xml changes
in patch file)
I'll leave this issue open for comments for a while before committing. Let me
know if there are any questions on these decisions.
> Special characters in collection license lead to parse error
> ------------------------------------------------------------
>
> Key: DS-399
> URL: http://jira.dspace.org/jira/browse/DS-399
> Project: DSpace 1.x
> Issue Type: Bug
> Components: XMLUI
> Affects Versions: 1.6.0
> Reporter: Claudia Jürgen
> Assignee: Tim Donohue
> Attachments: license-parse-error.patch
>
>
> Having special chars in the collection specific license lead to markup
> warnings
> During submission granting it:
> Error unable to parse: Error on line 2: The content of elements must consist
> of well-formed character data or markup.
> This is a test license. Some special chars äöüß#<&
> During edit collection:
> * Error on line 2: The content of elements must consist of well-formed
> character data or markup.
> The license itself is stored ok.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel