[Libreoffice] [PATCH] Bug 36390 breaks html filter fixed</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=libreoffice@lists.freedesktop.org&q=from:%22Chr.+Rossmanith%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Chr. Rossmanith</span></span></a></span> <span class="date"><a href="/search?l=libreoffice@lists.freedesktop.org&q=date:20110423" rel="nofollow">Sat, 23 Apr 2011 13:33:31 -0700</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre style="margin: 0em;"> Hi, </pre><tt>my fix for bug 34666 has been too conservative. Now the test for </tt><tt>HTML_UNKNOWNCONTROL_ON is removed and </tt><tt><title /> is treated correctly (c.f. bug 36390). I'm not sure whether </tt><tt>there should be a test if the token is a "ONOFF" token? And I'm not sure </tt><tt>if bug 36080 should be listed in the comment as well, but the strange </tt><tt>behaviour is mentioned in the discussion of 36080. </tt><pre style="margin: 0em;"></pre><pre> </pre><tt>There are some minor translations contained as well, please ignore </tt><tt>during reviewing (yes I know I should keep them separate - I just missed </tt><tt>those during translating all comments). </tt><pre style="margin: 0em;"> Christina </pre><pre>>From 50abefa305b603bb0b9b502b5fdd34786874026d Mon Sep 17 00:00:00 2001 From: Christina Rossmanith <chrrossman...@web.de> Date: Sat, 23 Apr 2011 22:25:26 +0200 Subject: [PATCH] Bug 36390 <title /> breaks html filter fixed --- svtools/source/svhtml/parhtml.cxx | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index aa760fa..77bdb75 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -372,7 +372,7 @@ int HTMLParser::FilterToken( int nToken ) { case sal_Unicode(EOF): nToken = 0; - break; // nicht verschicken + break; // don't pass case HTML_HEAD_OFF: bIsInBody = sal_True; @@ -393,7 +393,7 @@ int HTMLParser::FilterToken( int nToken ) case HTML_HTML_OFF: nToken = 0; bReadPRE = bReadListing = bReadXMP = sal_False; - break; // HTML_ON wurde auch nicht verschickt ! + break; // HTML_ON hasn't been passed either ! case HTML_PREFORMTXT_ON: StartPRE(); @@ -1223,12 +1223,10 @@ int HTMLParser::_GetNextToken() { ScanText( '>' ); - // fdo#34666: closing "/>"?: - // return HTML_UNKNOWNCONTROL_OFF instead of - // HTML_UNKNOWNCONTROL_ON + // fdo#34666 fdo#36080 fdo#36390: closing "/>"?: + // return HTML_<TOKEN>_OFF instead of HTML_<TOKEN>_ON if (aToken.Len() >= 1 && '/' == aToken.GetChar(aToken.Len()-1)) { - if (HTML_UNKNOWNCONTROL_ON == nRet) - nRet = HTML_UNKNOWNCONTROL_OFF; + nRet += 1; // HTML_<TOKEN>_ON -> HTML_<TOKEN>_OFF; } if( sal_Unicode(EOF) == nNextCh && rInput.IsEof() ) { @@ -1351,7 +1349,6 @@ int HTMLParser::_GetNextToken() bReadStyle = sal_False; break; } - } } break; @@ -1648,7 +1645,7 @@ int HTMLParser::FilterPRE( int nToken ) { xub_StrLen nSpaces = sal::static_int_cast< xub_StrLen >( 8 - (nPre_LinePos % 8)); - DBG_ASSERT( !aToken.Len(), "Wieso ist das Token nicht leer?" ); + DBG_ASSERT( !aToken.Len(), "Why is the token not empty?" ); aToken.Expand( nSpaces, ' ' ); nPre_LinePos += nSpaces; nToken = HTML_TEXTTOKEN; -- 1.7.0.4 </pre><pre>_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org <a rel="nofollow" href="http://lists.freedesktop.org/mailman/listinfo/libreoffice">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a> </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg09440.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="thrd11.html#09443">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="mail13.html#09443">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg09660.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email tSliceCur"><span class="subject">[Libreoffice] [PATCH] Bug 36390 <title /> breaks ht...</span> <span class="sender italic">Chr. Rossmanith</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg09660.html">Re: [Libreoffice] [PATCH] Bug 36390 <title /> ...</a></span> <span class="sender italic">Chr. Rossmanith</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg11502.html">[Libreoffice] [REVIEW] Re: [PATCH] Bug 36390 <...</a></span> <span class="sender italic">Caolán McNamara</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg11990.html">[Libreoffice] [PUSHED] [REVIEW] Re: [PATCH] ...</a></span> <span class="sender italic">Caolán McNamara</span></li> </ul> </ul> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="[Libreoffice] [PATCH] Bug 36390 <title /> breaks html filter fixed"> <input type="hidden" name="msgid" value="4DB33792.9090508@gmx.de"> <input type="hidden" name="relpath" value="libreoffice@lists.freedesktop.org/msg09443.html"> <input type="submit" value=" Chr. Rossmanith "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="libreoffice@lists.freedesktop.org"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search libreoffice"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/libreoffice@lists.freedesktop.org/">libreoffice - all messages</a></li> <li class="icons-about"><a href="/libreoffice@lists.freedesktop.org/info.html">libreoffice - about the list</a></li> <li class="icons-expand"><a href="/search?l=libreoffice@lists.freedesktop.org&q=subject:%22%5C%5BLibreoffice%5C%5D+%5C%5BPATCH%5C%5D+Bug+36390+%3Ctitle+%5C%2F%3E+breaks+html+filter+fixed%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg09440.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg09660.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">4DB33792.9090508@gmx.de</li> </ul> </div> </body> </html>