Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-2720

HTML Cleaning fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 1.6 M2
    • {Unused} Rendering 1.0
    • None

    Description

      Example that makes it fail:

      <h1 id="HWelcometoyourwiki"><span>Welcome to your wiki</span></h1><p>Welcome to your [second generation wiki&gt;<span class="wikiexternallink"><a class="wikimodel-freestanding" href="http://www.xwiki.org/">http://www.xwiki.org/</a></span>]! <br>It is an online, shared workspace that will allow you to collaborate effectively with others. You can use it for many purposes:</p><ul><li>Project Management</li><li>Collaborative Writing</li><li>Efficient Document Sharing</li><li>Knowledge Management</li></ul><p>... the only limit is your imagination!</p><h2 id="HHowtostart"><span>How to start</span></h2><p>Maybe you are used to work with a wiki... and maybe not. If you would like to get used to the basics of wiki edition, we have created a [Sandbox space&gt;Sandbox.WebHome] on this wiki. This space is meant to let you learn by yourself ;-)</p><p>There are other steps that you may want to go through, such as :</p><ul><li>Configuring your wiki by clicking on the 'Administration' link at the top right.</li><li>Changing the layout and menu contents by using the [Panel Wizard&gt;Panels.PanelWizard?forceLeftPanels=1&amp;amp;forceRightPanels=1]</li><li>Modifying this page, for example stating what your wiki is all about (You just have to click on the Edit button at the top left of this page).</li><li>Inviting your friends, family or co-workers to enjoy collaboration made easy.</li><li>Writing your documentation, sharing ideas, creating different spaces and organizing them the way you want.</li><li>And then [write some blog posts&gt;Blog.WebHome] in order to summarize your work.</li></ul><p>For more information you can visit [the documentation on xwiki.org&gt;<span class="wikiexternallink"><a class="wikimodel-freestanding" href="http://www.xwiki.org/xwiki/bin/view/Main/Documentation">http://www.xwiki.org/xwiki/bin/view/Main/Documentation</a></span>].</p><p>This XWiki is yours, we hope you'll enjoy it ...</p><p>Congratulations,<br><br>The XWiki Team</p>
      

      Error I get:

      14:50:24.822 WARN!! [P1-19] org.mortbay.jetty.servlet.ServletHandler$Context.log(ServletHandler.java:1151) >26> Exception while dispatching incoming RPC call
      com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.xpn.xwiki.wysiwyg.client.WysiwygService.cleanHTML(java.lang.String)' threw an unexpected exception: java.lang.IndexOutOfBoundsException: Index: 23
              at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360)
              at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546)
              at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:163)
              at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:85)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:616)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
              at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:830)
              at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:94)
              at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
              at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:287)
              at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
              at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
              at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:821)
              at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:471)
              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
              at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
              at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
              at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
              at org.mortbay.http.HttpServer.service(HttpServer.java:954)
              at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
              at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
              at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
              at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
              at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
              at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
      Caused by: java.lang.IndexOutOfBoundsException: Index: 23
              at java.util.AbstractList.listIterator(AbstractList.java:390)
              at org.htmlcleaner.HtmlCleaner.closeSnippet(Unknown Source)
              at org.htmlcleaner.HtmlCleaner.makeTree(Unknown Source)
              at org.htmlcleaner.HtmlTokenizer.addToken(Unknown Source)
              at org.htmlcleaner.HtmlTokenizer.tagStart(Unknown Source)
              at org.htmlcleaner.HtmlTokenizer.start(Unknown Source)
              at org.htmlcleaner.HtmlCleaner.clean(Unknown Source)
              at org.htmlcleaner.HtmlCleaner.clean(Unknown Source)
              at org.xwiki.xml.internal.html.DefaultHTMLCleaner.clean(DefaultHTMLCleaner.java:98)
              at com.xpn.xwiki.wysiwyg.server.DefaultWysiwygService.cleanHTML(DefaultWysiwygService.java:88)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
              ... 24 more
      

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: