Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8177450

javax.swing.text.html.parser.Parser parseScript ignores a character after comment end

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b166
    • CPU:
      x86_64
    • OS:
      generic

      Backports

        Description

        FULL PRODUCT VERSION :
        # java -version
        openjdk version "1.8.0_121"
        OpenJDK Runtime Environment (build 1.8.0_121-b13)
        OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

        A DESCRIPTION OF THE PROBLEM :
        When html that containes script fileld like below is parsed, eof.script error is throwen.
             <script type="text/javascript"><!--
                     function a(a) {}
             //--></script>

        It works fine when written as below:
             //--><SPACE></script>

             //--><CR>
             </script>

        It seems that because first character after END_COMMENT("-->") is ignored,
        so parseScript() can't find SCRIPT_END_TAG("</script>").

        It looks like a side effect of JDK-8078268 fix introduced in 8u112.
        When run in 8u111, either pattern works fine.

        REGRESSION. Last worked in version 8u111

        ADDITIONAL REGRESSION INFORMATION:
        # ./jdk1.8.0_111/bin/java -version
        java version "1.8.0_111"
        Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
        Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)


        REPRODUCIBILITY :
        This bug can be reproduced always.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mcherkas Mikhail Cherkasov (Inactive)
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: