Reporting

How to embed an iframe for a report from another system in Splunk? Getting "Error parsing XML on line 6: EntityRef: expecting ';'"

a212830
Champion

Hi,

I want to embed a report from another system in Splunk. The app provides perm URL's that are quite lengthy and Splunk seems to have an issue with it. When I create a simple iframe, it works, but when I try to change the url to something like below, I get an error (also below).

Perm url:

http://myhost:8181/pc/view/page?ViewContainer=1&DrillDown=1&AddCopyright=1&timeRange=0&startTime=201...

Error:

Encountered the following error while trying to update: In handler 'views': Error parsing XML on line 6: EntityRef: expecting ';' 

My code:

CA4SPLUNK

<html>
  <h1>test</h1>
  <iframe src="http://myhost:8181/pc/view/page?ViewContainer=1&DrillDown=1&AddCopyright=1&timeRange=0&startTime=2016-03-03+15%3A38+America%2FNew_York&endTime=2016-03-03+16%3A38+America%2FNew_York&GroupID=1775934&ViewToken=7fLY_Er8Nv9_lVHdvDsPcbOsPQvfUK4swldSpsBt1u07SWbOM4bTsJH3DPDBX00YHaGk901FsqpSYfaRDANJ86dNPcyhpZzVTmHRGjnUA6F811LlPNwYT4LHghzJTOU2So_CU_TBGdHoVN3dd2b-5rXEfhdFnZAhmAsxFak65r8*">my routers</iframe>
</html>
0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

I believe it is a problem with the XML parser trying to parse some special characters. Try wrapping your html data in a CDATA tag:

 <html><[CDATA[
   <h1>test</h1>
   <iframe src="http://myhost:8181/pc/view/page?ViewContainer=1&DrillDown=1&AddCopyright=1&timeRange=0&startTime=2016-03-03+15%3A38+America%2FNew_York&endTime=2016-03-03+16%3A38+America%2FNew_York&GroupID=1775934&ViewToken=7fLY_Er8Nv9_lVHdvDsPcbOsPQvfUK4swldSpsBt1u07SWbOM4bTsJH3DPDBX00YHaGk901FsqpSYfaRDANJ86dNPcyhpZzVTmHRGjnUA6F811LlPNwYT4LHghzJTOU2So_CU_TBGdHoVN3dd2b-5rXEfhdFnZAhmAsxFak65r8*">my routers</iframe>
 ]]></html>

sloshburch
Splunk Employee
Splunk Employee

Also, shouldn't there be nothing in between the iframe tags? the "my routers" part seems odd...

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

From : http://www.quackit.com/html_5/tags/html_iframe_tag.cfm

Note that in previous versions of HTML, you could create "fallback content" by placing content within the opening and closing <iframe> </iframe> tags. In HTML 5 however, the <iframe> element never has fallback content.
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...