Esri / geoportal-server

Geoportal Server is a standards-based, open source product that enables discovery and use of geospatial resources including data and services.
https://gptogc.esri.com/geoportal
Apache License 2.0
244 stars 149 forks source link

How to show line breaks/paragraph breaks in metadata abstract text boxes #207

Closed bmcvicker closed 8 years ago

bmcvicker commented 8 years ago

We are using the geoportal online metadata editor to create records. When adding text into one of the text boxes, e.g., abstract, supplemental info, lineage, etc., is there a way to show paragraph or line breaks in the resulting md record? We’ve tried just doing returns to separate paragraphs within a text box in edit mode, but when you look at the resulting metadata record, all paragraphs are still mashed together in one large paragraph.

Per Marten Hogeweg, this is an "artifact of using XML and HTML." He also said there is a way to embed code (<p></p>, etc,) into the xml of the metadata record to force it to respect paragraph breaks. I tried adding the code to the metadata xml I downloaded from geoportal, but when trying to upload it again, it does not validate. I'm probably not adding the code correctly (not a developer).

Can someone please share an example of how to properly embed the code into the metadata xml?

We have many of these records and would like to be able to display them better.

Thanks for your help!

mhogeweg commented 8 years ago

a bit more info on that: the editor preserves newlines, they are in the xml,

to render them in the HTML view, you would need an xml2html xslt that renders newlines (pick up the specific newline character and turning it into HTML newlines..

Markup in the xml won’t work, it will be escaped by the editor:
becomes: <br >

mgg-eagle commented 8 years ago

Are you able to add this as an enhancement to geoportal so that this is there by default? I think that this would be how people would expect the results to be displayed. Thanks.