rt 4.0.23
[freeside.git] / rt / sbin / rt-fulltext-indexer.in
index b90d8da..a55eb47 100644 (file)
@@ -3,7 +3,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -435,7 +435,10 @@ sub extract_html {
     my $attachment = shift;
     my $text = $attachment->Content;
     return undef unless defined $text && length($text);
-# TODO: html -> text
+# the rich text editor generates html entities for characters
+# but Pg doesn't index them, so decode to something it can index.
+    require HTML::Entities;
+    HTML::Entities::decode_entities($text);
     return \$text;
 }