mapcentia / vidi

Vidi – a modern take on browser GIS. It is the front-end client for GC2.
https://www.osgeo.org/projects/gc2-vidi/
GNU Affero General Public License v3.0
44 stars 24 forks source link

using new textarea widget in editor fails on submit #301

Closed giovanniborella closed 4 days ago

giovanniborella commented 4 days ago

when using the textarea with newlines, the feature fails.

billede

results in following response in gc2 feature api (i think):

{
    "success": false,
    "message": {
        "success": false,
        "message": "Could not decode GeoJSON",
        "code": 500,
        "_execution_time": 0.048
    }
}

the json-object sent looks like

{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"boolean":false,"timestamp":"2024-10-28T11%3A06","timestampz":"2024-10-28T11%3A06%2B01%3A00","text":"this%20is%0Asome%0Anew%0Alines"},"geometry":{"type":"Point","coordinates":[8.71627807617188,56.37361649220435]}}]}

im guessing that the featureapi decodes the string, but messes up when storing the newlines into the database

mapcentia commented 4 days ago

This should work in latest GC2 and Vidi