Search Index
Really easy fulltext search
Closed#3: Indexing chokes on HTML
Could you provide the HTML that didn’t work? With the original XSLT I have some test content such as:
<div markdown="1"> * aaa1 * aaa2 * aaa3 ## test h2 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <pre>TEST CODE</pre> </div>
In a Markdown Extra field (which gets converted to the expected HTML) and all content is correctly indexed.
So I’m not sure what’s causing problems.
I’m including some (multilingual) textbox fields and a normal input field to build the search index. One multilingual textbox has a markdown formatter. (The multilingual stuff should not cause the problem, because it just adds some @attr to the XML.) The $entry_xml->asXML()
for an entry looks like (it’s not indented)
<entry id="15"><interests mode="normal" word-count="3" handle="" handle-de="" handle-en="">Liste von Interessen</interests><location mode="normal" word-count="2" handle="sydney-australien" handle-de="sydney-australien" handle-en="sydney-australia">Sydney / Australien</location><name mode="normal" handle="lukas-coch" word-count="2">Lukas Coch</name><vita mode="normal" word-count="71"><p>Jahrgang 1981 ist <strong>Student</strong> der Dipl. Regionalwissenschaften Lateinamerika [...] Seit Anfang 2006 bei Zeitenspiegel.</p></vita></entry>
The broken output is (it stops just after the closing strong
tag)
Liste von Interessen Sydney / Australien Lukas Coch Jahrgang 1981 ist Student
and with my XSLT the output is
Liste von Interessen Sydney / Australien Lukas Coch Jahrgang 1981 ist Student der Dipl. Regionalwissenschaften Lateinamerika [...] Seit Anfang 2006 bei Zeitenspiegel.
I’ve resolved this in 0.4 I think. Thanks for the assistance.
This issue is closed.
The indexing of entries with HTML stops right after the first child node. Changing the XSL from
to
helped.