[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kupu-checkins
Subject:    [kupu-checkins] r51112 - kupu/trunk/kupu/plone
From:       duncan () codespeak ! net
Date:       2008-01-29 15:34:41
Message-ID: 20080129153441.9CD0D168413 () codespeak ! net
[Download RAW message or body]

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
 
_______________________________________________
kupu-checkins mailing list
kupu-checkins@codespeak.net
http://codespeak.net/mailman/listinfo/kupu-checkins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic