[MGNLUI-1957] Search returns nothing when searching for Umlaut store via CK editor Created: 26/Aug/13  Updated: 09/Mar/21

Status: Open
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.0, 5.0.3, 6.2.6
Fix Version/s: None

Type: Improvement Priority: Major
Reporter: Jaroslav Simak Assignee: Unassigned
Resolution: Unresolved Votes: 3
Labels: fckeditor, search, umlaut
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
clones MAGNOLIA-5014 Search _still_ returns nothing when s... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

This has been discussed many times, and I really did not expect to see that bug anymore, but...

If you enter text with umlaut characters, FCKEditor will automatically escape these. Now when you try to search for a word with an umlaut you're out of luck.

Possible work-arounds:

  1. Turn of escaping of latin special characters in FCKEditor (FCKConfig.IncludeLatinEntities = false
  2. encode your query term
  3. or, as Boris once proposed: save the content once in the escaped version and once without escaping


 Comments   
Comment by Jaroslav Simak [ 26/Aug/13 ]

See http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.entities_latin

Comment by Samuel Zihlmann [ 31/Mar/16 ]

How about a specific Html Lucene Analyzer? If we tweak the ClassicAnalyzer with a reader "converter" everything should index correctly...

convert reader before createComponents(...)

    private static Reader convertReader(Reader reader) {
        try {
            BodyContentHandler handler = new BodyContentHandler();
            Metadata metadata = new Metadata();
            InputStream inputStream = new ReaderInputStream(reader);
            ParseContext parseContext = new ParseContext();

            HtmlParser htmlparser = new HtmlParser();
            htmlparser.parse(inputStream, handler, metadata, parseContext);
            return new StringReader(handler.toString());
        }
        catch (Exception e) {
            return reader;
        }
    }
Generated at Mon Feb 12 08:51:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.