Skip to content

Use % in element's scope ui schema throws an exception  #2119

@leo-ori

Description

@leo-ori

Describe the bug

My initial issue was how to scape special characters in ui schema scope. But the I found the issue. When I'm using % in ui schema scope makes the library crash.

JSON schema property

"herbicide_concentration_\\%":{
                "type":"number",
                "title":"Herbicide Concentration %"
},

JSON ui schema element
{
"type": "Control",
"scope": "#/properties/herbicide_concentration_\%",
"label": "Herbicide Concentration %"
}

This throws a malformed decodeURI input in jsonforms-core.cjs.js.

Expected behavior

The library should handle the exception to avoid crash and show an error instead

Steps to reproduce the issue

Include a % in JSON key:

JSON schema property

"herbicide_concentration_\\%":{
                "type":"number",
                "title":"Herbicide Concentration %"
},

JSON ui schema element
{
"type": "Control",
"scope": "#/properties/herbicide_concentration_\%",
"label": "Herbicide Concentration %"
}

Screenshots

No response

In which browser are you experiencing the issue?

React Native

Which Version of JSON Forms are you using?

v3.0.0

Framework

No response

RendererSet

No response

Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions