Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4686

HTMLStripCharFilter and Highlighter generates invalid HTML

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.1
    • Fix Version/s: None
    • Component/s: highlighter
    • Labels:

      Description

      Using the HTMLStripCharFilter may yield to an invalid HTML highlight.

      The HTMLStripCharFilter has a special treatment of inline-elements (eg. "a", "b", ...). For theese elements the CharFilter ignores the tag and does not insert any split-character.

      If you index
      """
      <a>xxx</a>
      """
      you get the word "xxx" starting at position 3 ending on position 10

      If you highlight a search on "xxx", you will get
      """
      <a><em>xxx</a></em>
      """
      which is invalid HTML.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              floerke@doctronic.de Holger Floerke
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: