GandaG / pyfomod

A high-level fomod library written in Python.

Home Page:https://pyfomod.rtfd.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CDATA in xml tags are not parsed

leontristain opened this issue · comments

Not a blocker for me, just thought the issue ought to be logged. Thanks!

Steps to repro:

  1. Download the NMM version of Skyrim Special Edition mod "Insects Begone" (https://www.nexusmods.com/skyrimspecialedition/mods/1190?tab=files). This version comes with a FOMOD installer.

  2. Extract to a folder (let's say it's accessible at src/insects-begone)

  3. Observe the following behavior in python interpreter (using python 3.7.0, not sure if relevant):

>>> import pyfomod
>>> pyfomod.__version__
'0.8.1'
>>> root = pyfomod.parse('src/insects-begone')
>>> root.pages[0][0][0].name
'A reminder'
>>> root.pages[0][0][0].description
''
>>>
  1. Check the FOMOD xml to see this section:
<plugin name="A reminder">
        <description>
        <![CDATA[Read the descriptions for each of the files, they explain completely what each one does so you know exactly what you are getting. Don't rush through this installation if you want it to work completely.]]>
        </description>
        <files>
        </files>
        <typeDescriptor><type name="Optional"/></typeDescriptor>
</plugin>

Thanks for the report, will look into it asap!

@leontristain do me a favour and check if the description is correct if instead of

<description>
        <![CDATA[Read the descriptions for each of the files, they explain completely what each one does so you know exactly what you are getting. Don't rush through this installation if you want it to work completely.]]>
</description>

you have

<description><![CDATA[Read the descriptions for each of the files, they explain completely what each one does so you know exactly what you are getting. Don't rush through this installation if you want it to work completely.]]></description>

(all in one line)

I will check this when I get home today.

Just checked. Indeed if they're all part of the same line it will work.

Specifically, if there's no whitespace between the <description> tag and the CDATA tag, it will work.