[ 
https://issues.apache.org/jira/browse/WICKET-4494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Grigorov resolved WICKET-4494.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.0.0-RC1
                   1.5.6
         Assignee: Martin Grigorov

Thanks!
                
> HtmlHandler wrongly handles tags not requiring closed tags if the markup does 
> not have "top" level tag
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4494
>                 URL: https://issues.apache.org/jira/browse/WICKET-4494
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.5
>            Reporter: Michal Jirkovsky
>            Assignee: Martin Grigorov
>             Fix For: 1.5.6, 6.0.0-RC1
>
>         Attachments: HtmlHandlerTest.tgz
>
>
> Hi, 
> I have custom component (extends MarkupContainer implements 
> IMarkupCacheKeyProvider, IMarkupResourceStreamProvider) which fetches its 
> HTML markup from database. 
> Following HTML markup: 
> <img alt="" src="logo.png"> 
> <br>Some text 
> <br>Some more text 
> causes following error: 
> 2012-04-12 10:52:53,012 [http-8080-6] ERROR: Unexpected error occurred 
> Unable to find close tag for: '<img alt="logo" src="logo.png">' in 
> org.apache.wicket.util.resource.StringResourceStream@3d7e16fc 
>  MarkupStream: [unknown] 
>         at 
> org.apache.wicket.markup.MarkupFragment.<init>(MarkupFragment.java:127) 
>         at 
> org.apache.wicket.markup.MarkupStream.getMarkupFragment(MarkupStream.java:485)
>  
>         at 
> org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:244) 
>         at 
> org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1421) 
>         at 
> org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1596) 
>         at 
> org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1571)
>  
>         at 
> org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1525)
>  
> I think the problem is that 
> org.apache.wicket.markup.parser.filter.HtmlHandler does not handle such 
> markup correctly. It does not call ComponentTag.setHasNoCloseTag(true) for 
> the img tag. Such call is missing in postProcess() method. I think that this 
> problem can be fixed by inserting: 
> top.setHasNoCloseTag(true); 
> after line 80 in HtmlHandler.java file. 
> Michal

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to