Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.9.4
-
Fix Version/s: None
-
Component/s: Global search
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
Description
Index: label_document.php
===================================================================
RCS file: /cvsroot/moodle/moodle/search/documents/Attic/label_document.php,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 label_document.php
— label_document.php 27 Dec 2008 11:56:23 -0000 1.1.2.3
+++ label_document.php 27 Feb 2009 16:06:44 -0000
@@ -37,7 +37,7 @@
$doc->title = strip_tags($label['name']);
$doc->date = $label['timemodified'];
$doc->author = '';
- $doc->contents = strip_tags($label['name']);
+ $doc->contents = strip_tags($label['content']);
$doc->url = label_make_link($label['course']);
// module specific information; optional
Hi Urs,
I don't know if this was the exact cause : for labels name and content field have almost same content. Maybe it comes because "name" has a filtered content, which strips all HTML tags, and might glue some words in the text so significant tokens are broken...
givin 'content' to the indexer might submit HTML content that is not expected in the indexing hasher...
The most problematic issue comes from the core label code itself that might be reviewed to not filter the name field when recording the label, and thus letting richer HTML sequences to be let unchanged there...
I think the mest compromise might be putting here a filtered string but replacing HTML tags by spaces, not by an empty string, so that indexed wordset keeps correct.
Cheers.