Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6548

SearchHTMLExcerpt: Should also check for html end-tags and not closed openening tags and remove them

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 6.2
    • None

      When dropping a JCR query, the found row contains a excerpt snipped of the searched term highlighted and text before and after the found therm.
      The excerpt is done and processed by out class info.magnolia.jackrabbit.lucene.SearchHTMLExcerpt .

      Problem:
      If pages contain RichText content, containing a lot of li & ul tags, it is likely that the excerpt snipped will have a cut off </li> or </ul> tag form the content.
      So in the search results displaying, there is a wrong </li> or </ul> markup.
      Also it can happen, that at the end of the excerpt snipped a lead <li> or <ul> is fetched from the content, that are never closed.

      Solution:
      The class SearchHTMLExcerpt should check for wrong closing tags, and for opening tags that are never closed, and remove them from he excerpt snippet.

        Acceptance criteria

              Unassigned Unassigned
              cringele Christian Ringele
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:

                  Task DoD