Wicket
  1. Wicket
  2. WICKET-3433

Wicket parses HTML inside IE conditional comments

    Details

      Description

      I cannot use the HTML5 Boilerplate HTML with wicket. Wicket appears to parse HTML inside IE conditional comments when they appear between the doctype declaration and the <html> tag.

      The first lines of the boilerplate html look like this:

      <!doctype html>
      <Unable to render embedded object: File (--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <) not found.[endif]-->
      <Unable to render embedded object: File (--[if IE 7 ]> <html lang="en" class="no-js ie7"> <) not found.[endif]-->
      <Unable to render embedded object: File (--[if IE 8 ]> <html lang="en" class="no-js ie8"> <) not found.[endif]-->
      <Unable to render embedded object: File (--[if IE 9 ]> <html lang="en" class="no-js ie9"> <) not found.[endif]-->
      <Unable to render embedded object: File (--[if (gt IE 9)) not found.(IE)]><Unable to render embedded object: File (--> <html lang="en" class="no-js"> <) not found.-<![endif]->

      ...which causes a problem for wicket, as it thinks there are five opening <html> tags on the page.

      1. programmatic-way.tgz
        18 kB
        Martin Grigorov
      2. quickstart.zip
        4.31 MB
        Christian Lerch
      3. WICKET-3433.patch
        75 kB
        Pedro Santos
      4. SimplePageExpectedResult_12a.html
        1 kB
        Pedro Santos
      5. wicket-conditional-comments.patch
        20 kB
        Juergen Donnerstag
      6. html5boilerplate.ui.wicket.parsefail-working.zip
        33 kB
        Pedro Santos
      7. html5boilerplate.ui.wicket.parsefail.zip
        36 kB
        Alan Shaw

        Issue Links

          Activity

          Martin Grigorov made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Juergen Donnerstag [ jdonnerstag ] Martin Grigorov [ mgrigorov ]
          Resolution Won't Fix [ 2 ]
          Martin Grigorov made changes -
          Attachment programmatic-way.tgz [ 12482794 ]
          Christian Lerch made changes -
          Attachment quickstart.zip [ 12482791 ]
          Igor Vaynberg made changes -
          Link This issue is duplicated by WICKET-3801 [ WICKET-3801 ]
          Martin Grigorov made changes -
          Link This issue relates to WICKET-3648 [ WICKET-3648 ]
          Pedro Santos made changes -
          Attachment WICKET-3433.patch [ 12474141 ]
          Pedro Santos made changes -
          Attachment WICKET-3433.patch [ 12474095 ]
          Pedro Santos made changes -
          Attachment WICKET-3433.patch [ 12474095 ]
          Pedro Santos made changes -
          Attachment WICKET-3433.patch [ 12474089 ]
          Pedro Santos made changes -
          Attachment WICKET-3433.patch [ 12474089 ]
          Pedro Santos made changes -
          Attachment WICKET-3433-2.patch [ 12471585 ]
          Pedro Santos made changes -
          Attachment WICKET-3433.patch [ 12470995 ]
          Pedro Santos made changes -
          Attachment WICKET-3433-2.patch [ 12471585 ]
          Pedro Santos made changes -
          Attachment SimplePageExpectedResult_12a.html [ 12471537 ]
          Juergen Donnerstag made changes -
          Attachment wicket-conditional-comments.patch [ 12471463 ]
          Igor Vaynberg made changes -
          Assignee Juergen Donnerstag [ jdonnerstag ]
          Pedro Santos made changes -
          Attachment WICKET-3433.patch [ 12470995 ]
          Alan Shaw made changes -
          Comment [ I have tried this. It does not work.

          Wicket DOESNT parse IE conditional comments normally (i.e. not when between doctype and opening html tag). So to Wicket, this looks like 1 closing html tag. The temporary solution (as I show in the quickstart) is to close 5 html tags (WITHOUT conditional comments):

          </html></html></html></html></html>

          Obviously this means that wicket is happy, but you're sending invalid html to the browser.


          =====
          EDIT

          This is incorrect. Wicket always parses HTML content in IE conditional comments. This is the problem. ]
          Alan Shaw made changes -
          Summary Wicket parses HTML inside IE conditional comments when they appear between the doctype declaration and the <html> tag Wicket parses HTML inside IE conditional comments
          Pedro Santos made changes -
          Alan Shaw made changes -
          Comment [ Yes, it would, if you could get it to the browser, but wicket will throw an error and complain of mismatched tags. 5 opening html and 1 closing.

          I can submit another quickstart to demonstrate if that isn't clear. ]
          Alan Shaw made changes -
          Field Original Value New Value
          Attachment html5boilerplate.ui.wicket.parsefail.zip [ 12470490 ]
          Alan Shaw created issue -

            People

            • Assignee:
              Martin Grigorov
              Reporter:
              Alan Shaw
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development