[kupu-checkins] r51112 - kupu/trunk/kupu/plone

duncan at codespeak.net duncan at codespeak.net
Tue Jan 29 16:34:41 CET 2008


Author: duncan
Date: Tue Jan 29 16:34:39 2008
New Revision: 51112

Modified:
   kupu/trunk/kupu/plone/html2captioned.py
Log:
Plone ticket: 7728 turning on "Link using UIDs" breaks indexing of rich text fields that contain unicode characters out of the 128 
range
The transform now utf8 encodes the result if it was unicode.



Modified: kupu/trunk/kupu/plone/html2captioned.py
==============================================================================
--- kupu/trunk/kupu/plone/html2captioned.py	(original)
+++ kupu/trunk/kupu/plone/html2captioned.py	Tue Jan 29 16:34:39 2008
@@ -192,7 +192,8 @@
                 return match.group(0)
 
             html = UID_PATTERN.sub(replaceUids, html)
-            
+            if isinstance(html, unicode):
+                html = html.encode('utf8') # Indexing requires a string result.
             idata.setData(html)
             return idata
 


More information about the kupu-checkins mailing list