Commit db918d7e authored by Yusei Tahara's avatar Yusei Tahara

2007-11-16 Yusei

* Fixed Base_showFoundText. if document contains charactor which utf-8 codec cannot decode, remove it from result.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17653 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 269fd1d0
...@@ -121,7 +121,12 @@ found_text_fragments = context.cutFound(context, \n ...@@ -121,7 +121,12 @@ found_text_fragments = context.cutFound(context, \n
tags = (\'<div style="font-weight:bold;display:inline;">\', \'</div>\'), \n tags = (\'<div style="font-weight:bold;display:inline;">\', \'</div>\'), \n
trail = 5, \n trail = 5, \n
maxlines = 5)\n maxlines = 5)\n
return \' \'.join(map(str, found_text_fragments))\n result = \' \'.join(map(str, found_text_fragments))\n
\n
# Document may contains charactors which utf8 codec cannot decode.\n
unicode_result = result.decode(\'utf-8\', \'ignore\')\n
result = unicode_result.encode(\'utf-8\')\n
return result\n
]]></string> </value> ]]></string> </value>
...@@ -198,6 +203,7 @@ return \' \'.join(map(str, found_text_fragments))\n ...@@ -198,6 +203,7 @@ return \' \'.join(map(str, found_text_fragments))\n
<string>len</string> <string>len</string>
<string>found_text_fragments</string> <string>found_text_fragments</string>
<string>map</string> <string>map</string>
<string>unicode_result</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
2007-11-16 Yusei 2007-11-16 Yusei
* Fixed Base_showFoundText. selection_name argument is required for listbox. * Fixed Base_showFoundText. selection_name argument is required for listbox.
* Fixed Base_showFoundText. if document contains charactor which utf-8 codec cannot decode, remove it from result.
2007-10-11 Kazuhiko 2007-10-11 Kazuhiko
* move portal_contributions from Paths to Tools. * move portal_contributions from Paths to Tools.
......
700 705
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment