[HtmlUnit] [htmlunit:bugs] #1862 Special comment sign confuses html parser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1862 Special comment sign confuses html parser

Rural Hunter

[bugs:#1862] Special comment sign confuses html parser

Status: open
Group: 2.25
Created: Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
Last Updated: Tue Mar 28, 2017 07:08 AM UTC
Owner: nobody

The test method:

@Test
public void testSpecialComment() throws Exception
{
    WebClient wc=new WebClient();
    HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
    logger.debug(p.asText());              
    assert p.asText().contains("after");
}

The content of comment.html:

<html>
  <head>
    <title>
      title
    </title>
  </head>
  <body>
    before
      <!--->
      after
      <!--good comment-->      
  </body>
</html>

In normal browser, both 'before' and 'after' text are visible. With htmlunit, the "after" is missing in p.asText(). It is the special comment code between 'before' and 'after' causes htmlunit confusing with the comment end sign in the 'good comment' part.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1862 Special comment sign confuses html parser

RBRi-2
  • status: open --> accepted
  • assigned_to: RBRi

[bugs:#1862] Special comment sign confuses html parser

Status: accepted
Group: 2.25
Created: Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
Last Updated: Tue Mar 28, 2017 07:08 AM UTC
Owner: RBRi

The test method:

@Test
public void testSpecialComment() throws Exception
{
    WebClient wc=new WebClient();
    HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
    logger.debug(p.asText());              
    assert p.asText().contains("after");
}

The content of comment.html:

<html>
  <head>
    <title>
      title
    </title>
  </head>
  <body>
    before
      <!--->
      after
      <!--good comment-->      
  </body>
</html>

In normal browser, both 'before' and 'after' text are visible. With htmlunit, the "after" is missing in p.asText(). It is the special comment code between 'before' and 'after' causes htmlunit confusing with the comment end sign in the 'good comment' part.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1862 Special comment sign confuses html parser

RBRi-2
In reply to this post by Rural Hunter
  • status: accepted --> closed
  • Comment:

Fixed in SVN (you need the latest neko)
Thanks for reporting


[bugs:#1862] Special comment sign confuses html parser

Status: closed
Group: 2.25
Created: Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
Last Updated: Fri Apr 14, 2017 04:24 PM UTC
Owner: RBRi

The test method:

@Test
public void testSpecialComment() throws Exception
{
    WebClient wc=new WebClient();
    HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
    logger.debug(p.asText());              
    assert p.asText().contains("after");
}

The content of comment.html:

<html>
  <head>
    <title>
      title
    </title>
  </head>
  <body>
    before
      <!--->
      after
      <!--good comment-->      
  </body>
</html>

In normal browser, both 'before' and 'after' text are visible. With htmlunit, the "after" is missing in p.asText(). It is the special comment code between 'before' and 'after' causes htmlunit confusing with the comment end sign in the 'good comment' part.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1862 Special comment sign confuses html parser

Rural Hunter
In reply to this post by Rural Hunter

do you mean neko-html? It seems FragmentContextStackTest in neko-html fails in latest svn:

Test set: net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest
-------------------------------------------------------------------------------
Tests run: 3, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.319 sec <<< FAILURE!
testTR(net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest)  Time elapsed: 0.028 sec  <<< FAILURE!
junit.framework.ComparisonFailure: expected:<(TR[
(TD
"hello
)TD
]
)TR> but was:<(TR[
(TD
"hello
)TD]
)TR>
    at junit.framework.Assert.assertEquals(Assert.java:100)
    at junit.framework.Assert.assertEquals(Assert.java:107)
    at junit.framework.TestCase.assertEquals(TestCase.java:269)
    at net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest.doTest(FragmentContextStackTest.java:72)
    at net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest.testTR(FragmentContextStackTest.java:42)

[bugs:#1862] Special comment sign confuses html parser

Status: closed
Group: 2.25
Created: Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
Last Updated: Sat Apr 15, 2017 10:58 AM UTC
Owner: RBRi

The test method:

@Test
public void testSpecialComment() throws Exception
{
    WebClient wc=new WebClient();
    HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
    logger.debug(p.asText());              
    assert p.asText().contains("after");
}

The content of comment.html:

<html>
  <head>
    <title>
      title
    </title>
  </head>
  <body>
    before
      <!--->
      after
      <!--good comment-->      
  </body>
</html>

In normal browser, both 'before' and 'after' text are visible. With htmlunit, the "after" is missing in p.asText(). It is the special comment code between 'before' and 'after' causes htmlunit confusing with the comment end sign in the 'good comment' part.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] Re: #1862 Special comment sign confuses html parser

RBRi-2

Am 19. April 2017 04:00:46 MESZ schrieb Rural Hunter [hidden email]:

do you mean neko-html? It seems FragmentContextStackTest in neko-html
fails in latest svn:
~~~
Test set: net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest


Tests run: 3, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.319
sec <<< FAILURE!
testTR(net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest)
Time elapsed: 0.028 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<(TR<a class="" href='https://sourceforge.net/../(TD "hello )TD'>
(TD
"hello
)TD
)TR> but was:<(TR<a class="" href='https://sourceforge.net/../(TD "hello )TD'>
(TD
"hello
)TD
)TR>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at
net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest.doTest(FragmentContextStackTest.java:72)
at
net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest.testTR(FragmentContextStackTest.java:42)
~~~


[bugs:#1862] Special comment sign confuses html parser

Status: closed
Group: 2.25
Created: Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
Last Updated: Sat Apr 15, 2017 10:58 AM UTC
Owner: RBRi

The test method:
~~~
@Test
public void testSpecialComment() throws Exception
{
WebClient wc=new WebClient();
HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
logger.debug(p.asText());
assert p.asText().contains("after");
}
~~~

The content of comment.html:
~~~
<html>
<head>
<br> title<br>
</head>
<body>
before
after
</body>
</html>
~~~

In normal browser, both 'before' and 'after' text are visible. With
htmlunit, the "after" is missing in p.asText(). It is the special
comment code between 'before' and 'after' causes htmlunit confusing
with the comment end sign in the 'good comment' part.


Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/htmlunit/bugs/1862/

To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/

Just use the latest snapshot build....


[bugs:#1862] Special comment sign confuses html parser

Status: closed
Group: 2.25
Created: Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
Last Updated: Wed Apr 19, 2017 02:00 AM UTC
Owner: RBRi

The test method:

@Test
public void testSpecialComment() throws Exception
{
    WebClient wc=new WebClient();
    HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
    logger.debug(p.asText());              
    assert p.asText().contains("after");
}

The content of comment.html:

<html>
  <head>
    <title>
      title
    </title>
  </head>
  <body>
    before
      <!--->
      after
      <!--good comment-->      
  </body>
</html>

In normal browser, both 'before' and 'after' text are visible. With htmlunit, the "after" is missing in p.asText(). It is the special comment code between 'before' and 'after' causes htmlunit confusing with the comment end sign in the 'good comment' part.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] Re: #1862 Special comment sign confuses html parser

RBRi-2
In reply to this post by Rural Hunter

Hi Rural,

i guess you system uses a different line separator than my one. Fixed in SVN.

RBRi

On Wed, 19 Apr 2017 02:00:46 +0000 Rural Hunter wrote:

do you mean neko-html? It seems FragmentContextStackTest in neko-html fails in latest svn:
~~~
Test set: net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest


Tests run: 3, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.319 sec <<< FAILURE!
testTR(net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest) Time elapsed: 0.028 sec <<< FAILURE!
junit.framework.ComparisonFailure: expected:<(TR<a class="" href='https://sourceforge.net/../(TD "hello )TD'>
(TD
"hello
)TD
)TR> but was:<(TR<a class="" href='https://sourceforge.net/../(TD "hello )TD'>
(TD
"hello
)TD
)TR>
at junit.framework.Assert.assertEquals(Assert.java:100)
at junit.framework.Assert.assertEquals(Assert.java:107)
at junit.framework.TestCase.assertEquals(TestCase.java:269)
at net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest.doTest(FragmentContextStackTest.java:72)
at net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest.testTR(FragmentContextStackTest.java:42)
~~~


[bugs:#1862] Special comment sign confuses html parser

Status: closed
Group: 2.25
Created: Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
Last Updated: Sat Apr 15, 2017 10:58 AM UTC
Owner: RBRi

The test method:
~~~
@Test
public void testSpecialComment() throws Exception
{
WebClient wc=new WebClient();
HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
logger.debug(p.asText());
assert p.asText().contains("after");
}
~~~

The content of comment.html:
~~~
<html>
<head>
<br> title<br>
</head>
<body>
before
after
</body>
</html>
~~~

In normal browser, both 'before' and 'after' text are visible. With htmlunit, the "after" is missing in p.asText(). It is the special comment code between 'before' and 'after' causes htmlunit confusing with the comment end sign in the 'good comment'
part.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

----< Inline text [text-plain-05.txt] >------------------


Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

----< Inline text [text-plain-06.txt] >------------------


HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop


[bugs:#1862] Special comment sign confuses html parser

Status: closed
Group: 2.25
Created: Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
Last Updated: Wed Apr 19, 2017 02:00 AM UTC
Owner: RBRi

The test method:

@Test
public void testSpecialComment() throws Exception
{
    WebClient wc=new WebClient();
    HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
    logger.debug(p.asText());              
    assert p.asText().contains("after");
}

The content of comment.html:

<html>
  <head>
    <title>
      title
    </title>
  </head>
  <body>
    before
      <!--->
      after
      <!--good comment-->      
  </body>
</html>

In normal browser, both 'before' and 'after' text are visible. With htmlunit, the "after" is missing in p.asText(). It is the special comment code between 'before' and 'after' causes htmlunit confusing with the comment end sign in the 'good comment' part.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

Re: [HtmlUnit] [htmlunit:bugs] #1862 Special comment sign confuses html parser

Ronald Brill
In reply to this post by Rural Hunter
Hi Rural,

i guess you system uses a different line separator than my one. Fixed in SVN.

        RBRi

On Wed, 19 Apr 2017 02:00:46 +0000 Rural Hunter wrote:

>
>do  you mean neko-html? It seems FragmentContextStackTest in neko-html fails in latest svn:
>~~~
>Test set: net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest
>-------------------------------------------------------------------------------
>Tests run: 3, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.319 sec <<< FAILURE!
>testTR(net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest)  Time elapsed: 0.028 sec  <<< FAILURE!
>junit.framework.ComparisonFailure: expected:<(TR[
>(TD
>"hello
>)TD
>]
>)TR> but was:<(TR[
>(TD
>"hello
>)TD]
>)TR>
> at junit.framework.Assert.assertEquals(Assert.java:100)
> at junit.framework.Assert.assertEquals(Assert.java:107)
> at junit.framework.TestCase.assertEquals(TestCase.java:269)
> at net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest.doTest(FragmentContextStackTest.java:72)
> at net.sourceforge.htmlunit.cyberneko.FragmentContextStackTest.testTR(FragmentContextStackTest.java:42)
>~~~
>
>
>---
>
>** [bugs:#1862] Special comment sign confuses html parser**
>
>**Status:** closed
>**Group:** 2.25
>**Created:** Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
>**Last Updated:** Sat Apr 15, 2017 10:58 AM UTC
>**Owner:** RBRi
>
>
>The test method:
>~~~
>@Test
>public void testSpecialComment() throws Exception
>{
>    WebClient wc=new WebClient();
>    HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
>    logger.debug(p.asText());              
>    assert p.asText().contains("after");
>}
>~~~
>
>The content of comment.html:
>~~~
><html>
>  <head>
>    <title>
>      title
>    </title>
>  </head>
>  <body>
>    before
>      <!--->
>      after
>      <!--good comment-->      
>  </body>
></html>
>~~~
>
>In normal browser, both 'before' and 'after' text are visible. With htmlunit, the "after" is missing  in p.asText(). It is the special comment code between 'before' and 'after' causes htmlunit confusing with the comment end sign in the 'good comment'
>part.
>
>
>---
>
>Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/
>
>To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
>
>
>----< Inline text [text-plain-05.txt] >------------------
>
>------------------------------------------------------------------------------
>Check out the vibrant tech community on one of the world's most
>engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>----< Inline text [text-plain-06.txt] >------------------
>
>_______________________________________________
>HtmlUnit-develop mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
>
>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] [htmlunit:bugs] #1862 Special comment sign confuses html parser

Rural Hunter
In reply to this post by Rural Hunter

Yes, the test passes now. Thanks!


[bugs:#1862] Special comment sign confuses html parser

Status: closed
Group: 2.25
Created: Tue Mar 28, 2017 07:08 AM UTC by Rural Hunter
Last Updated: Wed Apr 19, 2017 02:00 AM UTC
Owner: RBRi

The test method:

@Test
public void testSpecialComment() throws Exception
{
    WebClient wc=new WebClient();
    HtmlPage p=wc.getPage(getClass().getResource("comment.html"));
    logger.debug(p.asText());              
    assert p.asText().contains("after");
}

The content of comment.html:

<html>
  <head>
    <title>
      title
    </title>
  </head>
  <body>
    before
      <!--->
      after
      <!--good comment-->      
  </body>
</html>

In normal browser, both 'before' and 'after' text are visible. With htmlunit, the "after" is missing in p.asText(). It is the special comment code between 'before' and 'after' causes htmlunit confusing with the comment end sign in the 'good comment' part.


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop