<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://svn.reviewboard.kde.org/r/5229/">http://svn.reviewboard.kde.org/r/5229/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">There is already an entity database for all the HTML ones in kdelibs --- KCharsets::fromEntity. Please use that.</pre>
 <br />







<p>- Maksim</p>


<br />
<p>On September 1st, 2010, 11:07 p.m., Sjors Gielen wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://svn.reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for kdelibs and Olivier Goffart.</div>
<div>By Sjors Gielen.</div>


<p style="color: grey;"><i>Updated 2010-09-01 23:07:30</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This patch adds HTML entity resolving.
The HTML stripper that I previously patched in KNotify is actually an XML stripper; this is not much of a problem except many HTML entities like &nbsp; are not valid in XML, making the parser fail; this has the effect that a message from an application with one such entity in it, is displayed as plain HTML, instead of the stripped message.
This patch adds a HtmlEntityResolver class and makes the XML stripper use it to resolve additional entities. The &nbsp; which would have caused an XML error, is now turned into a regular space, fixing the problem. (Any unknown HTML entities are currently replaced with an empty string.)

I placed HtmlEntityResolver inside NotifyByPopup because it is such a small class, but if I am going to add *all* HTML entities (there's a lot of them), I think it would be best to split the file off into its own class (unless there's a better class to use for this).

I think this patch should be backported to KDE 4.5 because it fixes an important bug.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Compiles and works on Mac OS X (tested with the Growl patch in 4.6 trunk). Only tested with &nbsp;, not with other HTML entities, or a mix of HTML and XML entities.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/KDE/kdebase/runtime/knotify/notifybypopup.h <span style="color: grey">(1170746)</span></li>

 <li>/trunk/KDE/kdebase/runtime/knotify/notifybypopup.cpp <span style="color: grey">(1170746)</span></li>

</ul>

<p><a href="http://svn.reviewboard.kde.org/r/5229/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>