← Back to team overview

dhis2-devs team mailing list archive

Use of square brackets [] in metadata field filter


Hi DHIS2 devs,

I faced an issue recently with using (unencoded) square brackets in
requests to the DHIS2 API. It turns out it was related to a new version of
tomcat (7.0.90). I've spoken to the tomcat devs and they've said that they
will now consider unencoded square brackets in a request to be an error.

According to the docs:
brackets are used to indicate a subfield, when using the field query

Might it be worth considering changing the symbol used for this? At the
very least it should be made clear that the requests using it will need to
be URL encoded.

There are even requests in the DHIS2 frontend (I'm running v2.27) which
have unencoded square brackets. The approvals page in the report view fails
with the new version of tomcat for this reason. It would be worth ensuring
all frontend requests are properly encoded.


- Jasper

Jasper Timm

Lead Software Developer


eHealth Africa
4A Renner Drive
Off Wilkinson Road (behind Monoprix Supermarket)
Freetown, Sierra Leone

mobile +232 99891119



Follow ups