Properties filter with HTML subfilter doesn't process HTML Code Finder Rules

Issue #729 new
Former user created an issue

When running a properties file through the properties filter with an HTML subfilter, everything in the HTML subfilter gets applied except for the code finder rules.

When copying the string out as an HTML file, then running just the HTML subfilter, everything works as expected.

I tested this with several versions of Rainbow, including the Okapi Apps snapshot from July 4.

Comments (6)

  1. Chase Tingley

    Hmm, I swear I've gotten this to work using an HTML subfilter in some other filter, but I forget the context.

  2. Dale Eggett

    I've had the HTML subfilter work great for JSON and XML Stream, too, so maybe this bug only affects the Properties filter. It was so surprising to me precisely because I know it works with other main filters.

  3. Jim Hargrave (OLD)

    I found the problem.We are overriding the code finder of the sub filter with the properties filter code finder rules. We did this to make sure that we were parsing the in-line Java message variables correctly (and the other in-line variants we define in the default properties parameter file). Using the code finder rules or a sub filter is an either or proposition you can't run both at the same time. The fix would be to run the Java properties code finder rules, then run the sub filter is normal.

        // if this is an html or xmlstream filter then set inline code
            // rules used to parse Java property codes
            if (sf.getName().startsWith("okf_html")
                    || sf.getName().startsWith("okf_xmlstream")) {
                AbstractMarkupEventBuilder eb = (AbstractMarkupEventBuilder) ((AbstractMarkupFilter) sf)
                        .getEventBuilder();
                eb.initializeCodeFinder(params.isUseCodeFinder(), params
                        .getCodeFinder().getRules());
            }
    
  4. Log in to comment