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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...