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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

 (view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...