speedata / publisher

speedata Publisher - a professional database Publishing system
https://www.speedata.de/
GNU Affero General Public License v3.0
296 stars 36 forks source link

DOCTYPE definition not possible in data.xml #355

Closed dark-m0de closed 2 years ago

dark-m0de commented 2 years ago

Some HTML entities that are used within xml in VSCode cause warnings, e.g.:

VSCode proposes to create a DOCTYPE definition, e.g. for  :

<?xml version="1.0"?>
<!DOCTYPE data [
  <!ENTITY nbsp "entity-value">
]>
<data>
</data>

However, adding a doctype definition to the data.xml crashes the speedata publisher:

Loading data file "/Users/conrad/Repositories/creisch-dev/creisch-fachinfo-template/data.xml"
Error: [page 1] ...ch-fachinfo-template/speedata-publisher/sw/lua/luxor.lua:69: bad argument #1 to 'gsub' (string expected, got nil)
stack traceback:
        ...-template/speedata-publisher/sw/lua/publisher/spinit.lua:57: in function 'call'
        ...-template/speedata-publisher/sw/lua/publisher/spinit.lua:408: in function 'main_loop'
        ...-template/speedata-publisher/sw/lua/publisher/spinit.lua:417: in main chunk
        [C]: in function 'require'
        [\directlua]:1: in main chunk
Stop processing data
1 errors occurred

May I kindly ask to review luxor.lua?

BR, Conrad

P.S.: I try my best to create a merge request in the future.

dark-m0de commented 2 years ago

P.P.S.: &#160; works as a workaround for &nbsp; to avoid warnings.

pgundlach commented 2 years ago

fixed in 4.7.7