Footnote popup: fix XHTML handling (#12158)

Latest MuPDF update changed HTML parsing, and use a better
HTML5 parser, which may cause some issues with the XHTML
we get from crengine.
So, for footnote popups, be sure we use MuPDF's XHTML parser.
This commit is contained in:
poire-z
2024-07-12 13:34:47 +02:00
committed by GitHub
parent 75d3e4c2dc
commit 7ebd067a95
3 changed files with 13 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ local Screen = Device.screen
local ScrollHtmlWidget = InputContainer:extend{
html_body = nil,
is_xhtml = false,
css = nil,
default_font_size = Screen:scaleBySize(24), -- same as infofont
htmlbox_widget = nil,
@@ -39,7 +40,7 @@ function ScrollHtmlWidget:init()
html_link_tapped_callback = self.html_link_tapped_callback,
}
self.htmlbox_widget:setContent(self.html_body, self.css, self.default_font_size)
self.htmlbox_widget:setContent(self.html_body, self.css, self.default_font_size, self.is_xhtml)
self.v_scroll_bar = VerticalScrollBar:new{
enable = self.htmlbox_widget.page_count > 1,