blob: f9f6c883d1fd64f0c8cd1908179d5c4752daa15b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
-- Fix bad entities
-- Sometimes, tex4ht produce named xml entities, which are prohobited in epub
-- , for example
function filter(s)
local replaces = {
nbsp = "#160"
}
return s:gsub("&(%w+);",function(x)
local m = replaces[x] or x
return "&"..m..";"
end)
end
return filter
|