Properties filter with HTML subfilter doesn't process HTML Code Finder Rules
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)
-
-
Hmm, I swear I've gotten this to work using an HTML subfilter in some other filter, but I forget the context.
-
- changed version to M35
It does seem like it's not working, though.
-
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.
-
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()); }
-
- changed milestone to M36
-
assigned issue to
- Log in to comment
Oops. Forgot to log in before creating the issue. This was from me.