Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in WXR_Parser_Regex when parsing authors #144

Open
pbiron opened this issue Mar 22, 2023 · 0 comments
Open

bug in WXR_Parser_Regex when parsing authors #144

pbiron opened this issue Mar 22, 2023 · 0 comments

Comments

@pbiron
Copy link

pbiron commented Mar 22, 2023

The regex parser assumes that author info is all contained on a single line, when in practice the WP exporter outputs authors across multiple lines in the WXR.

For example, the exporter outputs

 <wp:author>
   <wp:author_id>7</wp:author_id>
   <wp:author_login>username</wp:author_login>
   <wp:author_email>[email protected]</wp:author_email>
   <wp:author_display_name><![CDATA[First Last]]></wp:author_display_name>
   <wp:author_first_name><![CDATA[First]]></wp:author_first_name>
   <wp:author_last_name><![CDATA[Last]]></wp:author_last_name>
 </wp:author>

whereas, the regex parser is expecting

<wp:author><wp:author_id>7</wp:author_id><wp:author_login>username</wp:author_login><wp:author_email>[email protected]</wp:author_email><wp:author_display_name><![CDATA[First Last]]></wp:author_display_name><wp:author_first_name><![CDATA[First]]></wp:author_first_name><wp:author_last_name><![CDATA[Last]]></wp:author_last_name></wp:author>

I've got a tentative fix, but need to test it some more before submitting a PR (which probably won't be until the weekend)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant