0

I have a jsp page with

<noscript>
    <!--#include virtual="path" -->
</noscript>

The include contains Text Result which I expect is the "Text" displayed in the browser. Instead of that I get "Text" displayed in the browser. Can I somehow render that HTML correctly?

UPDATE: When I enter on the page first time, raw HTML is displayed, but when I enter on the page second time, HTML is rendered correctly, and I get only "Text" text.

Ma Kro
  • 1,232
  • 4
  • 20
  • 34
  • The behaviour you describe is not that of a noscript element. – Quentin Aug 24 '14 at 20:00
  • what do you mean? Noscript content is displayed when JS is disabled, so it fits perfect as my solution, but it escapes html, and I cannot include content from other server. – Ma Kro Aug 24 '14 at 20:01
  • It doesn't escape HTML. – Quentin Aug 24 '14 at 20:01
  • Screenshot showing that noscript doesn't escape HTML: http://note.io/1ojVJjD – Quentin Aug 24 '14 at 20:03
  • Umm yes - I asked the question not as I should. Sorry. Of course if I will just put the html in noscript tag - it will be displayed properly, however if the content is server by SSI, it is displayed as raw text. – Ma Kro Aug 24 '14 at 20:03
  • Normal use of SSI won't escape content either. – Quentin Aug 24 '14 at 20:04
  • In normal use yes, but I have a jsp page, which have the And in the result I got the
    Text
    – Ma Kro Aug 24 '14 at 20:06
  • My reading of the JSP manual suggests that includes are handled above the level of JSP and that virtual does a straight include of the content. So that shouldn't cause it to be escaped either. I'm not running a JSP capable server so I can't test it though. – Quentin Aug 24 '14 at 20:09
  • Sadly I've got the problem on my machine, and I don't know why. I also think that it should be displayed correctly, but it doesn't. And What I just saw: Raw HTML is displyed only when I enter on the page first time. When I enter on that page second time, HTML displays correctly. – Ma Kro Aug 24 '14 at 20:13

1 Answers1

2

My issue was caused by bug in chrome. More details here: https://code.google.com/p/chromium/issues/detail?id=232410

Ma Kro
  • 1,232
  • 4
  • 20
  • 34