You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2011/04/27 14:54:03 UTC

[jira] [Created] (WICKET-3648) AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line

AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line
----------------------------------------------------------------------------------------

                 Key: WICKET-3648
                 URL: https://issues.apache.org/jira/browse/WICKET-3648
             Project: Wicket
          Issue Type: Bug
          Components: wicket-core
    Affects Versions: 1.5-RC3
            Reporter: Martin Grigorov


A markup like:
 <!--[if lt IE 8 ]>
            <style></style>
            <script src="js/ie7.js"></script>
        <![endif]-->

makes AbstractMarkupParser#removeComment(String) to enter in endless loop.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3648) AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3648:
------------------------------------

    Description: 
A markup like:
 <!--[if lt IE 8 ]>
            <style></style>
            <script src="js/ie7.js"></script>
        <![endif]-->

and the application is configured with: getMarkupSettings().setStripComments(true);

makes AbstractMarkupParser#removeComment(String) to enter in endless loop.

  was:
A markup like:
 <!--[if lt IE 8 ]>
            <style></style>
            <script src="js/ie7.js"></script>
        <![endif]-->

makes AbstractMarkupParser#removeComment(String) to enter in endless loop.


> AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line
> ----------------------------------------------------------------------------------------
>
>                 Key: WICKET-3648
>                 URL: https://issues.apache.org/jira/browse/WICKET-3648
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Martin Grigorov
>
> A markup like:
>  <!--[if lt IE 8 ]>
>             <style></style>
>             <script src="js/ie7.js"></script>
>         <![endif]-->
> and the application is configured with: getMarkupSettings().setStripComments(true);
> makes AbstractMarkupParser#removeComment(String) to enter in endless loop.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3648) AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025776#comment-13025776 ] 

Martin Grigorov commented on WICKET-3648:
-----------------------------------------

Тhe problem is that there is an inner tag and the RawMarkup for the opening comment has no knowledge about the closing tag.

> AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line
> ----------------------------------------------------------------------------------------
>
>                 Key: WICKET-3648
>                 URL: https://issues.apache.org/jira/browse/WICKET-3648
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Martin Grigorov
>
> A markup like:
>  <!--[if lt IE 8 ]>
>             <style></style>
>             <script src="js/ie7.js"></script>
>         <![endif]-->
> makes AbstractMarkupParser#removeComment(String) to enter in endless loop.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-3648) AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3648.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC4
         Assignee: Martin Grigorov

Fixed with r1097472.

> AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line
> ----------------------------------------------------------------------------------------
>
>                 Key: WICKET-3648
>                 URL: https://issues.apache.org/jira/browse/WICKET-3648
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC4
>
>         Attachments: WICKET-3648.patch
>
>
> A markup like:
>  <!--[if lt IE 8 ]>
>             <style></style>
>             <script src="js/ie7.js"></script>
>         <![endif]-->
> and the application is configured with: getMarkupSettings().setStripComments(true);
> makes AbstractMarkupParser#removeComment(String) to enter in endless loop.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3648) AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025780#comment-13025780 ] 

Martin Grigorov commented on WICKET-3648:
-----------------------------------------

I added a unit test demonstrating the problem:
org.apache.wicket.markup.MarkupParserTest.wicket3648testCommentsWithNestedElements()

Remove the prefix "wicket3648" to run it.

> AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line
> ----------------------------------------------------------------------------------------
>
>                 Key: WICKET-3648
>                 URL: https://issues.apache.org/jira/browse/WICKET-3648
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Martin Grigorov
>
> A markup like:
>  <!--[if lt IE 8 ]>
>             <style></style>
>             <script src="js/ie7.js"></script>
>         <![endif]-->
> and the application is configured with: getMarkupSettings().setStripComments(true);
> makes AbstractMarkupParser#removeComment(String) to enter in endless loop.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3648) AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025808#comment-13025808 ] 

Martin Grigorov commented on WICKET-3648:
-----------------------------------------

This specific bug is fixed but stripping comments causes IE conditional comments to become broken/cut.
It would be good to test WICKET-3433 with getMarkupSettings().setStripComments(true);

> AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line
> ----------------------------------------------------------------------------------------
>
>                 Key: WICKET-3648
>                 URL: https://issues.apache.org/jira/browse/WICKET-3648
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Martin Grigorov
>         Attachments: WICKET-3648.patch
>
>
> A markup like:
>  <!--[if lt IE 8 ]>
>             <style></style>
>             <script src="js/ie7.js"></script>
>         <![endif]-->
> and the application is configured with: getMarkupSettings().setStripComments(true);
> makes AbstractMarkupParser#removeComment(String) to enter in endless loop.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-3648) AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3648:
------------------------------------

    Attachment: WICKET-3648.patch

A patch fixing the problem.
Please review.

> AbstractMarkupParser.removeComment() goes in endless loop when the comment is multi line
> ----------------------------------------------------------------------------------------
>
>                 Key: WICKET-3648
>                 URL: https://issues.apache.org/jira/browse/WICKET-3648
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>            Reporter: Martin Grigorov
>         Attachments: WICKET-3648.patch
>
>
> A markup like:
>  <!--[if lt IE 8 ]>
>             <style></style>
>             <script src="js/ie7.js"></script>
>         <![endif]-->
> and the application is configured with: getMarkupSettings().setStripComments(true);
> makes AbstractMarkupParser#removeComment(String) to enter in endless loop.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira