W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] <% text %> and <? text ?> in corporate intranet html content

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 9 Feb 2010 22:56:45 -0600
Message-ID: <dd0fbad1002092056p263b105fi23673d232cb12b13@mail.gmail.com>
On Tue, Feb 9, 2010 at 9:05 PM, Biju <bijumaillist at gmail.com> wrote:
> What should a user agent display when html content is...
>
> <html><body>
> <%@ page language="java" %>
> </body></html>
>
> At present IE and Safari display blank
>
> Firefox display <%@ page language="java" %>
>
> And for document.body.innerHTML browsers give
> Firefox --> &lt;%@ page language="java" %&gt;
> IE --><%@ page language="java" %>
> and Safari gives blank
>
> Also for
> <html><body>
> <? some text ?>
> </body></html>
>
> Firefox gives blank
>
> But for
> <html><body>
> abc <? echo ">" ??> xyz
> </body></html>
>
> Firefox display...
> abc " ?> xyz
>
> ie, all the contents after first ">"
> with .innerHTML --> abc " ??&gt; xyz
>
> IE in this case again hide all content till "?>"
> as well as preserve content including the white space in innerHTML
>
> Due to these problems browsing corporate intranet with Firefox is
> little irritating.
> Calling help desk and asking to provide fix will get a reply that
> company has standardized on IE6, so please use IE.
>
>
> So per HTML standard in both case what should user agent display and
> as well as content of .innerHTML

All of these cases appear to be an ASP or PHP page that is
accidentally being sent as ordinary html.  You shouldn't be seeing
these tags at all in the source of the page unless a server is
misconfigured.

That said, given that you *are* seeing them, I'm not certain what the
correct behavior is, but it's definitely strictly defined in HTML5.
Can someone else with more familiarity with the parser algorithm help
out here?

~TJ
Received on Tuesday, 9 February 2010 20:56:45 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC