Dashboards & Visualizations

Problem with space character in simple xml for dashboard

C_Sparn
Communicator

Hello,

I have the problem, that space characters are not saved in the simple xml structure of my dashboards. This is a part of one of my dashboards:

<input type="multiselect" token="group" searchWhenChanged="true">
  <label>group by...</label>
  <choice value="ChangeDay">Day</choice>
  <prefix>by </prefix>
  <delimiter> </delimiter>
</input>

You can see that I have a space character at delimiter and one after by. That one at deleimiter is saved correctly, but that after by is deleted after a reload. How can I save all space characters permanently?

Greetings

1 Solution

jkat54
SplunkTrust
SplunkTrust

What happens if you use &#32; instead of spaces?

<prefix>by&#32;</prefix>

View solution in original post

afishkin_splunk
Splunk Employee
Splunk Employee

Space for is not trimmed, just leave as
Try by

0 Karma

C_Sparn
Communicator

The space between delimiter is saved permanently, so there is no problem, but the space after by is deleted after reopening/reloading the dashboard.

0 Karma

jkat54
SplunkTrust
SplunkTrust

What happens if you use &#32; instead of spaces?

<prefix>by&#32;</prefix>

jkat54
SplunkTrust
SplunkTrust

updated, way to think outside the box and build upon my idea!

0 Karma

jkat54
SplunkTrust
SplunkTrust

For anyone else showing up here that doesn't understand the solution; I'll explain why this works and how to use the same technique for other characters too.

It works because this is the percent encoded value for what is the spacebar. Percent encoding is used in a variety of ways including urlencoding. It's a way to avoid passing special characters which may be misinterpreted by your web app (in this case the splunk web UI).

More here:

 https://en.m.wikipedia.org/wiki/Percent-encoding

There are plenty of urlencoding reference websites if you'd like to encode your own characters. But my favorite method is with TA Web Tools (shameless self promotion).

https://splunkbase.splunk.com/app/3420/

0 Karma

C_Sparn
Communicator

Nice idea with using   but that is not accepted by splunk. But I also tried &#32 and this is working now!
Thanks for the help. Can you cahnge your answer to &#32 (don't forget the ; after 32) that I can vote for it?

Greetings

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...