Building for the Splunk Platform

How to remove fields containing 'metadata' keyword that get html encoded?

clx
Engager

Hi there,

I've a scripted lookup that returns a field which contains text data. What is really intriguing is that if the returned data contains "metadata" in it, then the text is html encoded (partially at least), and not if this keyword 'metadata' is not present. Any logical explanation to that? How can I remove this html encoding?

| stats count | eval curious = "jambon: de -> bayonne" | fields curious

This will result in a single field containing "jambon: de -> bayonne" as expected.

| stats count | eval curious = "metadata: de -> bayonne" | fields curious

This will result in a single field containing "metadata: de -> bayonne" which is not expected ; why is the ">" html encoded?!

I thought it was related to the fact that "metadata" is also a Splunk command, but after a few tries with "search", "metasearch",  "mcollect", etc, none of those trigger this behaviour. Is this a weird bug?

I'm on Splunk 8.2.3, can you guys reproduce and on which versions?

Thanks,

Labels (1)
Tags (2)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

It has nothing to do with lookup.

But yes, if I do this:

| makeresults 
| eval curious = "metadata: de !@#$%^&*(<> bayonne"
| table curious

I get this:

metadata: de !@#$%^&amp;*(&lt;&gt; bayonne

 On 8.2.5

EDIT: What is even more interesting, is that it's indeed treated differently in other aspects. For example, it's not getting split properly into multivalued field.

Try

| makeresults | eval a = "metadata:,a" | eval b=split(a,",")
Get Updates on the Splunk Community!

.conf23 | Get Your Cybersecurity Defense Analyst Certification in Vegas

We’re excited to announce a new Splunk certification exam being released at .conf23! If you’re going to Las ...

Streamline Data Ingestion With Deployment Server Essentials

REGISTER NOW!Every day the list of sources Admins are responsible for gets bigger and bigger, often making the ...

Remediate Threats Faster and Simplify Investigations With Splunk Enterprise Security ...

REGISTER NOW!Join us for a Tech Talk around our latest release of Splunk Enterprise Security 7.2! We’ll walk ...