You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Leo Kim (JIRA)" <ji...@apache.org> on 2007/10/08 21:17:50 UTC

[jira] Created: (WICKET-1050) MarkupParser.removeComment() does not properly parse to end of HTML comment

MarkupParser.removeComment() does not properly parse to end of HTML comment
---------------------------------------------------------------------------

                 Key: WICKET-1050
                 URL: https://issues.apache.org/jira/browse/WICKET-1050
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-beta3
            Reporter: Leo Kim


The test case is pretty simple. Class definition:

import org.apache.wicket.markup.html.WebPage;

public class CommentStrippingTest extends WebPage {
  public CommentStrippingTest() {
    super();
  }
}

HTML page:

<html>
<body>
<div class="foo"><!-- test --></div>
</body>
</html>

And do the following when inittingyour Application class:

    final IMarkupSettings settings = getMarkupSettings();
    settings.setStripComments(true);

The output of this page should be blank, but the page shows this HTML fragment:

/div>

The core of the problem appears to be here (starting line 483):

					if (rawMarkup.length() >= pos2 + 4)
					{
						buf.append(rawMarkup.substring(pos2 + 4));
					}

pos2 +4 should be pos2 + 3 it would seem, since an HTML close comment "-->" is 3 characters long, not 3. 

Couldn't find an existing issue in the JIRA so am creating a new one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WICKET-1050) MarkupParser.removeComment() does not properly parse to end of HTML comment

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

Leo Kim closed WICKET-1050.
---------------------------

       Resolution: Invalid
    Fix Version/s: 1.3.0-beta4

This appears to have been fixed in r571708 by jdonnerstag (2007-09-01). Will await the beta4 release for this!

> MarkupParser.removeComment() does not properly parse to end of HTML comment
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-1050
>                 URL: https://issues.apache.org/jira/browse/WICKET-1050
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Leo Kim
>             Fix For: 1.3.0-beta4
>
>
> The test case is pretty simple. Class definition:
> import org.apache.wicket.markup.html.WebPage;
> public class CommentStrippingTest extends WebPage {
>   public CommentStrippingTest() {
>     super();
>   }
> }
> HTML page:
> <html>
> <body>
> <div class="foo"><!-- test --></div>
> </body>
> </html>
> And do the following when inittingyour Application class:
>     final IMarkupSettings settings = getMarkupSettings();
>     settings.setStripComments(true);
> The output of this page should be blank, but the page shows this HTML fragment:
> /div>
> The core of the problem appears to be here (starting line 483):
> 					if (rawMarkup.length() >= pos2 + 4)
> 					{
> 						buf.append(rawMarkup.substring(pos2 + 4));
> 					}
> pos2 +4 should be pos2 + 3 it would seem, since an HTML close comment "-->" is 3 characters long, not 4. 
> Couldn't find an existing issue in the JIRA so am creating a new one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1050) MarkupParser.removeComment() does not properly parse to end of HTML comment

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

Leo Kim updated WICKET-1050:
----------------------------

    Description: 
The test case is pretty simple. Class definition:

import org.apache.wicket.markup.html.WebPage;

public class CommentStrippingTest extends WebPage {
  public CommentStrippingTest() {
    super();
  }
}

HTML page:

<html>
<body>
<div class="foo"><!-- test --></div>
</body>
</html>

And do the following when inittingyour Application class:

    final IMarkupSettings settings = getMarkupSettings();
    settings.setStripComments(true);

The output of this page should be blank, but the page shows this HTML fragment:

/div>

The core of the problem appears to be here (starting line 483):

					if (rawMarkup.length() >= pos2 + 4)
					{
						buf.append(rawMarkup.substring(pos2 + 4));
					}

pos2 +4 should be pos2 + 3 it would seem, since an HTML close comment "-->" is 3 characters long, not 4. 

Couldn't find an existing issue in the JIRA so am creating a new one. 

  was:
The test case is pretty simple. Class definition:

import org.apache.wicket.markup.html.WebPage;

public class CommentStrippingTest extends WebPage {
  public CommentStrippingTest() {
    super();
  }
}

HTML page:

<html>
<body>
<div class="foo"><!-- test --></div>
</body>
</html>

And do the following when inittingyour Application class:

    final IMarkupSettings settings = getMarkupSettings();
    settings.setStripComments(true);

The output of this page should be blank, but the page shows this HTML fragment:

/div>

The core of the problem appears to be here (starting line 483):

					if (rawMarkup.length() >= pos2 + 4)
					{
						buf.append(rawMarkup.substring(pos2 + 4));
					}

pos2 +4 should be pos2 + 3 it would seem, since an HTML close comment "-->" is 3 characters long, not 3. 

Couldn't find an existing issue in the JIRA so am creating a new one. 


> MarkupParser.removeComment() does not properly parse to end of HTML comment
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-1050
>                 URL: https://issues.apache.org/jira/browse/WICKET-1050
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta3
>            Reporter: Leo Kim
>
> The test case is pretty simple. Class definition:
> import org.apache.wicket.markup.html.WebPage;
> public class CommentStrippingTest extends WebPage {
>   public CommentStrippingTest() {
>     super();
>   }
> }
> HTML page:
> <html>
> <body>
> <div class="foo"><!-- test --></div>
> </body>
> </html>
> And do the following when inittingyour Application class:
>     final IMarkupSettings settings = getMarkupSettings();
>     settings.setStripComments(true);
> The output of this page should be blank, but the page shows this HTML fragment:
> /div>
> The core of the problem appears to be here (starting line 483):
> 					if (rawMarkup.length() >= pos2 + 4)
> 					{
> 						buf.append(rawMarkup.substring(pos2 + 4));
> 					}
> pos2 +4 should be pos2 + 3 it would seem, since an HTML close comment "-->" is 3 characters long, not 4. 
> Couldn't find an existing issue in the JIRA so am creating a new one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.