[opencms-dev] W3C validation errors using lucene search feature

Roberto Melino roberto.melino at regulus.it
Thu Oct 2 17:13:27 CEST 2008


I found a W3C validation problem (XHTML strict) in result pane using the 
Lucene feature proposed by OpenCms library.
Inside the excerpt, the word been searched is highlighted with wrong tag 
<B></B> (the error is the capitalization).
The problem could be correct modifying the class CmsTermHighlighterHtml, 
changing the constructor of the class Highlighter in this way:
    new Highlighter(new 
org.apache.lucene.search.highlight.SimpleHTMLFormatter("<b>", "</b>"), ...
You can substitute the class CmsTermHighlighterHtml changing the 
opencms-search.xml configuration file in the <highlighter> section.
Hoping this will be useful for someone else.
Bye
Roberto Melino



More information about the opencms-dev mailing list