HTML Filter: base element is not recognised

Issue #946 resolved
Denis Konovalyenko created an issue

Please consider the following snippet:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>This is an example for the &lt;base&gt; element</title>
    <base href="https://www.example.com/news/index.html">
  </head>
  <body>
    <p>Visit the <a href="archives.html">archives</a>.</p>
  </body>
</html>

The filter crashes with the following exception on extraction:

java.lang.NullPointerException
    at net.sf.okapi.filters.abstractmarkup.config.TaggedFilterConfiguration.isRuleType(TaggedFilterConfiguration.java:308)
    at net.sf.okapi.filters.abstractmarkup.config.TaggedFilterConfiguration.getElementRuleTypeCandidate(TaggedFilterConfiguration.java:583)
    at net.sf.okapi.filters.abstractmarkup.AbstractMarkupFilter.preProcess(AbstractMarkupFilter.java:479)
    at net.sf.okapi.filters.html.HtmlFilter.preProcess(HtmlFilter.java:143)
    at net.sf.okapi.filters.abstractmarkup.AbstractMarkupFilter.next(AbstractMarkupFilter.java:317)

This is an HTML Living Standard and this is HTML5 Recommendations with more details on which attributes can be supported.

Comments (2)

  1. Log in to comment