Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8305710

Line breaks in search tags cause invalid JSON in index file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • tools
    • None
    • b25
    • generic
    • generic

      The JavaDoc search index writer does not escape or remove line break characters. This causes the generated search index file to contain illegal JSON, resulting in the whole search functionality to be unavailable.

      The solution is to either escape or remove line breaks in search tags. Additionally, it might be a good idea to make sure search for other categories is still available if one of the index files is corrupt.

      An alternative solution would be to make sure that line breaks are removed from search tags before passing them to the index writer, and throw if the index writer sees a line break.

            hannesw Hannes Wallnoefer
            hannesw Hannes Wallnoefer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: