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>
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>
Also, shouldn't there be nothing in between the iframe tags? the "my routers" part seems odd...
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.